/*!
 * jQuery JavaScript Library v1.7.2
 * http://jquery.com/
 *
 * Copyright 2011, John Resig
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * Includes Sizzle.js
 * http://sizzlejs.com/
 * Copyright 2011, The Dojo Foundation
 * Released under the MIT, BSD, and GPL Licenses.
 *
 * Date: Wed Mar 21 12:46:34 2012 -0700
 */

/*!
 * Sizzle CSS Selector Engine
 *  Copyright 2011, The Dojo Foundation
 *  Released under the MIT, BSD, and GPL Licenses.
 *  More information: http://sizzlejs.com/
 */

// Knockout JavaScript library v2.1.0
// (c) Steven Sanderson - http://knockoutjs.com/
// License: MIT (http://www.opensource.org/licenses/mit-license.php)

/// (c) 2012 Steven Sanderson, Roy Jacobs - http://knockoutjs.com/

/// License: MIT (http://www.opensource.org/licenses/mit-license.php)

// moment.js
// version : 1.7.0
// author : Tim Wood
// license : MIT
// momentjs.com

//     Underscore.js 1.3.3
//     (c) 2009-2012 Jeremy Ashkenas, DocumentCloud Inc.
//     Underscore is freely distributable under the MIT license.
//     Portions of Underscore are inspired or borrowed from Prototype,
//     Oliver Steele's Functional, and John Resig's Micro-Templating.
//     For all details and documentation:
//     http://documentcloud.github.com/underscore

/**
 * @license handlebars hbs 0.2.1 - Alex Sexton, but Handlebars has it's own licensing junk
 *
 * Available via the MIT or new BSD license.
 * see: http://github.com/jrburke/require-cs for details on the plugin this was based off of
 */

/* ===================================================
 * bootstrap-transition.js v2.1.0
 * http://twitter.github.com/bootstrap/javascript.html#transitions
 * ===================================================
 * Copyright 2012 Twitter, Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * ========================================================== */

/* ==========================================================
 * bootstrap-alert.js v2.1.0
 * http://twitter.github.com/bootstrap/javascript.html#alerts
 * ==========================================================
 * Copyright 2012 Twitter, Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * ========================================================== */

/* ============================================================
 * bootstrap-button.js v2.1.0
 * http://twitter.github.com/bootstrap/javascript.html#buttons
 * ============================================================
 * Copyright 2012 Twitter, Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * ============================================================ */

/* ==========================================================
 * bootstrap-carousel.js v2.1.0
 * http://twitter.github.com/bootstrap/javascript.html#carousel
 * ==========================================================
 * Copyright 2012 Twitter, Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * ========================================================== */

/* =============================================================
 * bootstrap-collapse.js v2.1.0
 * http://twitter.github.com/bootstrap/javascript.html#collapse
 * =============================================================
 * Copyright 2012 Twitter, Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * ============================================================ */

/* ============================================================
 * bootstrap-dropdown.js v2.1.0
 * http://twitter.github.com/bootstrap/javascript.html#dropdowns
 * ============================================================
 * Copyright 2012 Twitter, Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * ============================================================ */

/* =========================================================
 * bootstrap-modal.js v2.1.0
 * http://twitter.github.com/bootstrap/javascript.html#modals
 * =========================================================
 * Copyright 2012 Twitter, Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * ========================================================= */

/* ===========================================================
 * bootstrap-tooltip.js v2.1.0
 * http://twitter.github.com/bootstrap/javascript.html#tooltips
 * Inspired by the original jQuery.tipsy by Jason Frame
 * ===========================================================
 * Copyright 2012 Twitter, Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * ========================================================== */

/* ===========================================================
 * bootstrap-popover.js v2.1.0
 * http://twitter.github.com/bootstrap/javascript.html#popovers
 * ===========================================================
 * Copyright 2012 Twitter, Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =========================================================== */

/* =============================================================
 * bootstrap-scrollspy.js v2.1.0
 * http://twitter.github.com/bootstrap/javascript.html#scrollspy
 * =============================================================
 * Copyright 2012 Twitter, Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * ============================================================== */

/* ========================================================
 * bootstrap-tab.js v2.1.0
 * http://twitter.github.com/bootstrap/javascript.html#tabs
 * ========================================================
 * Copyright 2012 Twitter, Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * ======================================================== */

/* =============================================================
 * bootstrap-typeahead.js v2.1.0
 * http://twitter.github.com/bootstrap/javascript.html#typeahead
 * =============================================================
 * Copyright 2012 Twitter, Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * ============================================================ */

/* ==========================================================
 * bootstrap-affix.js v2.1.0
 * http://twitter.github.com/bootstrap/javascript.html#affix
 * ==========================================================
 * Copyright 2012 Twitter, Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * ========================================================== */

/*

Quicksand 1.2.2

Reorder and filter items with a nice shuffling animation.

Copyright (c) 2010 Jacek Galanciak (razorjack.net) and agilope.com
Big thanks for Piotr Petrus (riddle.pl) for deep code review and wonderful docs & demos.

Dual licensed under the MIT and GPL version 2 licenses.
http://github.com/jquery/jquery/blob/master/MIT-LICENSE.txt
http://github.com/jquery/jquery/blob/master/GPL-LICENSE.txt

Project site: http://razorjack.net/quicksand
Github site: http://github.com/razorjack/quicksand

*/

/*
 * jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/
 *
 * Uses the built in easing capabilities added In jQuery 1.1
 * to offer multiple easing options
 *
 * TERMS OF USE - jQuery Easing
 * 
 * Open source under the BSD License. 
 * 
 * Copyright © 2008 George McGinley Smith
 * All rights reserved.
 * 
 * Redistribution and use in source and binary forms, with or without modification, 
 * are permitted provided that the following conditions are met:
 * 
 * Redistributions of source code must retain the above copyright notice, this list of 
 * conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright notice, this list 
 * of conditions and the following disclaimer in the documentation and/or other materials 
 * provided with the distribution.
 * 
 * Neither the name of the author nor the names of contributors may be used to endorse 
 * or promote products derived from this software without specific prior written permission.
 * 
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
 *  COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 *  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
 *  GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 
 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
 *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 
 * OF THE POSSIBILITY OF SUCH DAMAGE. 
 *
*/

/*
 *
 * TERMS OF USE - EASING EQUATIONS
 * 
 * Open source under the BSD License. 
 * 
 * Copyright © 2001 Robert Penner
 * All rights reserved.
 * 
 * Redistribution and use in source and binary forms, with or without modification, 
 * are permitted provided that the following conditions are met:
 * 
 * Redistributions of source code must retain the above copyright notice, this list of 
 * conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright notice, this list 
 * of conditions and the following disclaimer in the documentation and/or other materials 
 * provided with the distribution.
 * 
 * Neither the name of the author nor the names of contributors may be used to endorse 
 * or promote products derived from this software without specific prior written permission.
 * 
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
 *  COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 *  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
 *  GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 
 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
 *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 
 * OF THE POSSIBILITY OF SUCH DAMAGE. 
 *
 */

(function(e,t){function u(e){var t=o[e]={},n,r;e=e.split(/\s+/);for(n=0,r=e.length;n<r;n++)t[e[n]]=!0;return t}function c(e,n,r){if(r===t&&e.nodeType===1){var i="data-"+n.replace(l,"-$1").toLowerCase();r=e.getAttribute(i);if(typeof r=="string"){try{r=r==="true"?!0:r==="false"?!1:r==="null"?null:s.isNumeric(r)?+r:f.test(r)?s.parseJSON(r):r}catch(o){}s.data(e,n,r)}else r=t}return r}function h(e){for(var t in e){if(t==="data"&&s.isEmptyObject(e[t]))continue;if(t!=="toJSON")return!1}return!0}function p(e,t,n){var r=t+"defer",i=t+"queue",o=t+"mark",u=s._data(e,r);u&&(n==="queue"||!s._data(e,i))&&(n==="mark"||!s._data(e,o))&&setTimeout(function(){!s._data(e,i)&&!s._data(e,o)&&(s.removeData(e,r,!0),u.fire())},0)}function H(){return!1}function B(){return!0}function W(e){return!e||!e.parentNode||e.parentNode.nodeType===11}function X(e,t,n){t=t||0;if(s.isFunction(t))return s.grep(e,function(e,r){var i=!!t.call(e,r,e);return i===n});if(t.nodeType)return s.grep(e,function(e,r){return e===t===n});if(typeof t=="string"){var r=s.grep(e,function(e){return e.nodeType===1});if(q.test(t))return s.filter(t,r,!n);t=s.filter(t,r)}return s.grep(e,function(e,r){return s.inArray(e,t)>=0===n})}function V(e){var t=$.split("|"),n=e.createDocumentFragment();if(n.createElement)while(t.length)n.createElement(t.pop());return n}function at(e,t){return s.nodeName(e,"table")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function ft(e,t){if(t.nodeType!==1||!s.hasData(e))return;var n,r,i,o=s._data(e),u=s._data(t,o),a=o.events;if(a){delete u.handle,u.events={};for(n in a)for(r=0,i=a[n].length;r<i;r++)s.event.add(t,n,a[n][r])}u.data&&(u.data=s.extend({},u.data))}function lt(e,t){var n;if(t.nodeType!==1)return;t.clearAttributes&&t.clearAttributes(),t.mergeAttributes&&t.mergeAttributes(e),n=t.nodeName.toLowerCase(),n==="object"?t.outerHTML=e.outerHTML:n!=="input"||e.type!=="checkbox"&&e.type!=="radio"?n==="option"?t.selected=e.defaultSelected:n==="input"||n==="textarea"?t.defaultValue=e.defaultValue:n==="script"&&t.text!==e.text&&(t.text=e.text):(e.checked&&(t.defaultChecked=t.checked=e.checked),t.value!==e.value&&(t.value=e.value)),t.removeAttribute(s.expando),t.removeAttribute("_submit_attached"),t.removeAttribute("_change_attached")}function ct(e){return typeof e.getElementsByTagName!="undefined"?e.getElementsByTagName("*"):typeof e.querySelectorAll!="undefined"?e.querySelectorAll("*"):[]}function ht(e){if(e.type==="checkbox"||e.type==="radio")e.defaultChecked=e.checked}function pt(e){var t=(e.nodeName||"").toLowerCase();t==="input"?ht(e):t!=="script"&&typeof e.getElementsByTagName!="undefined"&&s.grep(e.getElementsByTagName("input"),ht)}function dt(e){var t=n.createElement("div");return ut.appendChild(t),t.innerHTML=e.outerHTML,t.firstChild}function kt(e,t,n){var r=t==="width"?e.offsetWidth:e.offsetHeight,i=t==="width"?1:0,o=4;if(r>0){if(n!=="border")for(;i<o;i+=2)n||(r-=parseFloat(s.css(e,"padding"+xt[i]))||0),n==="margin"?r+=parseFloat(s.css(e,n+xt[i]))||0:r-=parseFloat(s.css(e,"border"+xt[i]+"Width"))||0;return r+"px"}r=Tt(e,t);if(r<0||r==null)r=e.style[t];if(bt.test(r))return r;r=parseFloat(r)||0;if(n)for(;i<o;i+=2)r+=parseFloat(s.css(e,"padding"+xt[i]))||0,n!=="padding"&&(r+=parseFloat(s.css(e,"border"+xt[i]+"Width"))||0),n==="margin"&&(r+=parseFloat(s.css(e,n+xt[i]))||0);return r+"px"}function Qt(e){return function(t,n){typeof t!="string"&&(n=t,t="*");if(s.isFunction(n)){var r=t.toLowerCase().split(qt),i=0,o=r.length,u,a,f;for(;i<o;i++)u=r[i],f=/^\+/.test(u),f&&(u=u.substr(1)||"*"),a=e[u]=e[u]||[],a[f?"unshift":"push"](n)}}}function Gt(e,n,r,i,s,o){s=s||n.dataTypes[0],o=o||{},o[s]=!0;var u=e[s],a=0,f=u?u.length:0,l=e===Wt,c;for(;a<f&&(l||!c);a++)c=u[a](n,r,i),typeof c=="string"&&(!l||o[c]?c=t:(n.dataTypes.unshift(c),c=Gt(e,n,r,i,c,o)));return(l||!c)&&!o["*"]&&(c=Gt(e,n,r,i,"*",o)),c}function Yt(e,n){var r,i,o=s.ajaxSettings.flatOptions||{};for(r in n)n[r]!==t&&((o[r]?e:i||(i={}))[r]=n[r]);i&&s.extend(!0,e,i)}function Zt(e,t,n,r){if(s.isArray(t))s.each(t,function(t,i){n||At.test(e)?r(e,i):Zt(e+"["+(typeof i=="object"?t:"")+"]",i,n,r)});else if(!n&&s.type(t)==="object")for(var i in t)Zt(e+"["+i+"]",t[i],n,r);else r(e,t)}function en(e,n,r){var i=e.contents,s=e.dataTypes,o=e.responseFields,u,a,f,l;for(a in o)a in r&&(n[o[a]]=r[a]);while(s[0]==="*")s.shift(),u===t&&(u=e.mimeType||n.getResponseHeader("content-type"));if(u)for(a in i)if(i[a]&&i[a].test(u)){s.unshift(a);break}if(s[0]in r)f=s[0];else{for(a in r){if(!s[0]||e.converters[a+" "+s[0]]){f=a;break}l||(l=a)}f=f||l}if(f)return f!==s[0]&&s.unshift(f),r[f]}function tn(e,n){e.dataFilter&&(n=e.dataFilter(n,e.dataType));var r=e.dataTypes,i={},o,u,a=r.length,f,l=r[0],c,h,p,d,v;for(o=1;o<a;o++){if(o===1)for(u in e.converters)typeof u=="string"&&(i[u.toLowerCase()]=e.converters[u]);c=l,l=r[o];if(l==="*")l=c;else if(c!=="*"&&c!==l){h=c+" "+l,p=i[h]||i["* "+l];if(!p){v=t;for(d in i){f=d.split(" ");if(f[0]===c||f[0]==="*"){v=i[f[1]+" "+l];if(v){d=i[d],d===!0?p=v:v===!0&&(p=d);break}}}}!p&&!v&&s.error("No conversion from "+h.replace(" "," to ")),p!==!0&&(n=p?p(n):v(d(n)))}}return n}function an(){try{return new e.XMLHttpRequest}catch(t){}}function fn(){try{return new e.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}function yn(){return setTimeout(bn,0),gn=s.now()}function bn(){gn=t}function wn(e,t){var n={};return s.each(mn.concat.apply([],mn.slice(0,t)),function(){n[this]=e}),n}function En(e){if(!ln[e]){var t=n.body,r=s("<"+e+">").appendTo(t),i=r.css("display");r.remove();if(i==="none"||i===""){cn||(cn=n.createElement("iframe"),cn.frameBorder=cn.width=cn.height=0),t.appendChild(cn);if(!hn||!cn.createElement)hn=(cn.contentWindow||cn.contentDocument).document,hn.write((s.support.boxModel?"<!doctype html>":"")+"<html><body>"),hn.close();r=hn.createElement(e),hn.body.appendChild(r),i=s.css(r,"display"),t.removeChild(cn)}ln[e]=i}return ln[e]}function Nn(e){return s.isWindow(e)?e:e.nodeType===9?e.defaultView||e.parentWindow:!1}var n=e.document,r=e.navigator,i=e.location,s=function(){function H(){if(i.isReady)return;try{n.documentElement.doScroll("left")}catch(e){setTimeout(H,1);return}i.ready()}var i=function(e,t){return new i.fn.init(e,t,u)},s=e.jQuery,o=e.$,u,a=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,f=/\S/,l=/^\s+/,c=/\s+$/,h=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,p=/^[\],:{}\s]*$/,d=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,v=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,m=/(?:^|:|,)(?:\s*\[)+/g,g=/(webkit)[ \/]([\w.]+)/,y=/(opera)(?:.*version)?[ \/]([\w.]+)/,b=/(msie) ([\w.]+)/,w=/(mozilla)(?:.*? rv:([\w.]+))?/,E=/-([a-z]|[0-9])/ig,S=/^-ms-/,x=function(e,t){return(t+"").toUpperCase()},T=r.userAgent,N,C,k,L=Object.prototype.toString,A=Object.prototype.hasOwnProperty,O=Array.prototype.push,M=Array.prototype.slice,_=String.prototype.trim,D=Array.prototype.indexOf,P={};return i.fn=i.prototype={constructor:i,init:function(e,r,s){var o,u,f,l;if(!e)return this;if(e.nodeType)return this.context=this[0]=e,this.length=1,this;if(e==="body"&&!r&&n.body)return this.context=n,this[0]=n.body,this.selector=e,this.length=1,this;if(typeof e=="string"){e.charAt(0)==="<"&&e.charAt(e.length-1)===">"&&e.length>=3?o=[null,e,null]:o=a.exec(e);if(o&&(o[1]||!r)){if(o[1])return r=r instanceof i?r[0]:r,l=r?r.ownerDocument||r:n,f=h.exec(e),f?i.isPlainObject(r)?(e=[n.createElement(f[1])],i.fn.attr.call(e,r,!0)):e=[l.createElement(f[1])]:(f=i.buildFragment([o[1]],[l]),e=(f.cacheable?i.clone(f.fragment):f.fragment).childNodes),i.merge(this,e);u=n.getElementById(o[2]);if(u&&u.parentNode){if(u.id!==o[2])return s.find(e);this.length=1,this[0]=u}return this.context=n,this.selector=e,this}return!r||r.jquery?(r||s).find(e):this.constructor(r).find(e)}return i.isFunction(e)?s.ready(e):(e.selector!==t&&(this.selector=e.selector,this.context=e.context),i.makeArray(e,this))},selector:"",jquery:"1.7.2",length:0,size:function(){return this.length},toArray:function(){return M.call(this,0)},get:function(e){return e==null?this.toArray():e<0?this[this.length+e]:this[e]},pushStack:function(e,t,n){var r=this.constructor();return i.isArray(e)?O.apply(r,e):i.merge(r,e),r.prevObject=this,r.context=this.context,t==="find"?r.selector=this.selector+(this.selector?" ":"")+n:t&&(r.selector=this.selector+"."+t+"("+n+")"),r},each:function(e,t){return i.each(this,e,t)},ready:function(e){return i.bindReady(),C.add(e),this},eq:function(e){return e=+e,e===-1?this.slice(e):this.slice(e,e+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(M.apply(this,arguments),"slice",M.call(arguments).join(","))},map:function(e){return this.pushStack(i.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:O,sort:[].sort,splice:[].splice},i.fn.init.prototype=i.fn,i.extend=i.fn.extend=function(){var e,n,r,s,o,u,a=arguments[0]||{},f=1,l=arguments.length,c=!1;typeof a=="boolean"&&(c=a,a=arguments[1]||{},f=2),typeof a!="object"&&!i.isFunction(a)&&(a={}),l===f&&(a=this,--f);for(;f<l;f++)if((e=arguments[f])!=null)for(n in e){r=a[n],s=e[n];if(a===s)continue;c&&s&&(i.isPlainObject(s)||(o=i.isArray(s)))?(o?(o=!1,u=r&&i.isArray(r)?r:[]):u=r&&i.isPlainObject(r)?r:{},a[n]=i.extend(c,u,s)):s!==t&&(a[n]=s)}return a},i.extend({noConflict:function(t){return e.$===i&&(e.$=o),t&&e.jQuery===i&&(e.jQuery=s),i},isReady:!1,readyWait:1,holdReady:function(e){e?i.readyWait++:i.ready(!0)},ready:function(e){if(e===!0&&!--i.readyWait||e!==!0&&!i.isReady){if(!n.body)return setTimeout(i.ready,1);i.isReady=!0;if(e!==!0&&--i.readyWait>0)return;C.fireWith(n,[i]),i.fn.trigger&&i(n).trigger("ready").off("ready")}},bindReady:function(){if(C)return;C=i.Callbacks("once memory");if(n.readyState==="complete")return setTimeout(i.ready,1);if(n.addEventListener)n.addEventListener("DOMContentLoaded",k,!1),e.addEventListener("load",i.ready,!1);else if(n.attachEvent){n.attachEvent("onreadystatechange",k),e.attachEvent("onload",i.ready);var t=!1;try{t=e.frameElement==null}catch(r){}n.documentElement.doScroll&&t&&H()}},isFunction:function(e){return i.type(e)==="function"},isArray:Array.isArray||function(e){return i.type(e)==="array"},isWindow:function(e){return e!=null&&e==e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return e==null?String(e):P[L.call(e)]||"object"},isPlainObject:function(e){if(!e||i.type(e)!=="object"||e.nodeType||i.isWindow(e))return!1;try{if(e.constructor&&!A.call(e,"constructor")&&!A.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(n){return!1}var r;for(r in e);return r===t||A.call(e,r)},isEmptyObject:function(e){for(var t in e)return!1;return!0},error:function(e){throw new Error(e)},parseJSON:function(t){if(typeof t!="string"||!t)return null;t=i.trim(t);if(e.JSON&&e.JSON.parse)return e.JSON.parse(t);if(p.test(t.replace(d,"@").replace(v,"]").replace(m,"")))return(new Function("return "+t))();i.error("Invalid JSON: "+t)},parseXML:function(n){if(typeof n!="string"||!n)return null;var r,s;try{e.DOMParser?(s=new DOMParser,r=s.parseFromString(n,"text/xml")):(r=new ActiveXObject("Microsoft.XMLDOM"),r.async="false",r.loadXML(n))}catch(o){r=t}return(!r||!r.documentElement||r.getElementsByTagName("parsererror").length)&&i.error("Invalid XML: "+n),r},noop:function(){},globalEval:function(t){t&&f.test(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(S,"ms-").replace(E,x)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toUpperCase()===t.toUpperCase()},each:function(e,n,r){var s,o=0,u=e.length,a=u===t||i.isFunction(e);if(r){if(a){for(s in e)if(n.apply(e[s],r)===!1)break}else for(;o<u;)if(n.apply(e[o++],r)===!1)break}else if(a){for(s in e)if(n.call(e[s],s,e[s])===!1)break}else for(;o<u;)if(n.call(e[o],o,e[o++])===!1)break;return e},trim:_?function(e){return e==null?"":_.call(e)}:function(e){return e==null?"":e.toString().replace(l,"").replace(c,"")},makeArray:function(e,t){var n=t||[];if(e!=null){var r=i.type(e);e.length==null||r==="string"||r==="function"||r==="regexp"||i.isWindow(e)?O.call(n,e):i.merge(n,e)}return n},inArray:function(e,t,n){var r;if(t){if(D)return D.call(t,e,n);r=t.length,n=n?n<0?Math.max(0,r+n):n:0;for(;n<r;n++)if(n in t&&t[n]===e)return n}return-1},merge:function(e,n){var r=e.length,i=0;if(typeof n.length=="number")for(var s=n.length;i<s;i++)e[r++]=n[i];else while(n[i]!==t)e[r++]=n[i++];return e.length=r,e},grep:function(e,t,n){var r=[],i;n=!!n;for(var s=0,o=e.length;s<o;s++)i=!!t(e[s],s),n!==i&&r.push(e[s]);return r},map:function(e,n,r){var s,o,u=[],a=0,f=e.length,l=e instanceof i||f!==t&&typeof f=="number"&&(f>0&&e[0]&&e[f-1]||f===0||i.isArray(e));if(l)for(;a<f;a++)s=n(e[a],a,r),s!=null&&(u[u.length]=s);else for(o in e)s=n(e[o],o,r),s!=null&&(u[u.length]=s);return u.concat.apply([],u)},guid:1,proxy:function(e,n){if(typeof n=="string"){var r=e[n];n=e,e=r}if(!i.isFunction(e))return t;var s=M.call(arguments,2),o=function(){return e.apply(n,s.concat(M.call(arguments)))};return o.guid=e.guid=e.guid||o.guid||i.guid++,o},access:function(e,n,r,s,o,u,a){var f,l=r==null,c=0,h=e.length;if(r&&typeof r=="object"){for(c in r)i.access(e,n,c,r[c],1,u,s);o=1}else if(s!==t){f=a===t&&i.isFunction(s),l&&(f?(f=n,n=function(e,t,n){return f.call(i(e),n)}):(n.call(e,s),n=null));if(n)for(;c<h;c++)n(e[c],r,f?s.call(e[c],c,n(e[c],r)):s,a);o=1}return o?e:l?n.call(e):h?n(e[0],r):u},now:function(){return(new Date).getTime()},uaMatch:function(e){e=e.toLowerCase();var t=g.exec(e)||y.exec(e)||b.exec(e)||e.indexOf("compatible")<0&&w.exec(e)||[];return{browser:t[1]||"",version:t[2]||"0"}},sub:function(){function e(t,n){return new e.fn.init(t,n)}i.extend(!0,e,this),e.superclass=this,e.fn=e.prototype=this(),e.fn.constructor=e,e.sub=this.sub,e.fn.init=function(r,s){return s&&s instanceof i&&!(s instanceof e)&&(s=e(s)),i.fn.init.call(this,r,s,t)},e.fn.init.prototype=e.fn;var t=e(n);return e},browser:{}}),i.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(e,t){P["[object "+t+"]"]=t.toLowerCase()}),N=i.uaMatch(T),N.browser&&(i.browser[N.browser]=!0,i.browser.version=N.version),i.browser.webkit&&(i.browser.safari=!0),f.test(" ")&&(l=/^[\s\xA0]+/,c=/[\s\xA0]+$/),u=i(n),n.addEventListener?k=function(){n.removeEventListener("DOMContentLoaded",k,!1),i.ready()}:n.attachEvent&&(k=function(){n.readyState==="complete"&&(n.detachEvent("onreadystatechange",k),i.ready())}),i}(),o={};s.Callbacks=function(e){e=e?o[e]||u(e):{};var n=[],r=[],i,a,f,l,c,h,p=function(t){var r,i,o,u,a;for(r=0,i=t.length;r<i;r++)o=t[r],u=s.type(o),u==="array"?p(o):u==="function"&&(!e.unique||!v.has(o))&&n.push(o)},d=function(t,s){s=s||[],i=!e.memory||[t,s],a=!0,f=!0,h=l||0,l=0,c=n.length;for(;n&&h<c;h++)if(n[h].apply(t,s)===!1&&e.stopOnFalse){i=!0;break}f=!1,n&&(e.once?i===!0?v.disable():n=[]:r&&r.length&&(i=r.shift(),v.fireWith(i[0],i[1])))},v={add:function(){if(n){var e=n.length;p(arguments),f?c=n.length:i&&i!==!0&&(l=e,d(i[0],i[1]))}return this},remove:function(){if(n){var t=arguments,r=0,i=t.length;for(;r<i;r++)for(var s=0;s<n.length;s++)if(t[r]===n[s]){f&&s<=c&&(c--,s<=h&&h--),n.splice(s--,1);if(e.unique)break}}return this},has:function(e){if(n){var t=0,r=n.length;for(;t<r;t++)if(e===n[t])return!0}return!1},empty:function(){return n=[],this},disable:function(){return n=r=i=t,this},disabled:function(){return!n},lock:function(){return r=t,(!i||i===!0)&&v.disable(),this},locked:function(){return!r},fireWith:function(t,n){return r&&(f?e.once||r.push([t,n]):(!e.once||!i)&&d(t,n)),this},fire:function(){return v.fireWith(this,arguments),this},fired:function(){return!!a}};return v};var a=[].slice;s.extend({Deferred:function(e){var t=s.Callbacks("once memory"),n=s.Callbacks("once memory"),r=s.Callbacks("memory"),i="pending",o={resolve:t,reject:n,notify:r},u={done:t.add,fail:n.add,progress:r.add,state:function(){return i},isResolved:t.fired,isRejected:n.fired,then:function(e,t,n){return a.done(e).fail(t).progress(n),this},always:function(){return a.done.apply(a,arguments).fail.apply(a,arguments),this},pipe:function(e,t,n){return s.Deferred(function(r){s.each({done:[e,"resolve"],fail:[t,"reject"],progress:[n,"notify"]},function(e,t){var n=t[0],i=t[1],o;s.isFunction(n)?a[e](function(){o=n.apply(this,arguments),o&&s.isFunction(o.promise)?o.promise().then(r.resolve,r.reject,r.notify):r[i+"With"](this===a?r:this,[o])}):a[e](r[i])})}).promise()},promise:function(e){if(e==null)e=u;else for(var t in u)e[t]=u[t];return e}},a=u.promise({}),f;for(f in o)a[f]=o[f].fire,a[f+"With"]=o[f].fireWith;return a.done(function(){i="resolved"},n.disable,r.lock).fail(function(){i="rejected"},t.disable,r.lock),e&&e.call(a,a),a},when:function(e){function c(e){return function(n){t[e]=arguments.length>1?a.call(arguments,0):n,--o||f.resolveWith(f,t)}}function h(e){return function(t){i[e]=arguments.length>1?a.call(arguments,0):t,f.notifyWith(l,i)}}var t=a.call(arguments,0),n=0,r=t.length,i=new Array(r),o=r,u=r,f=r<=1&&e&&s.isFunction(e.promise)?e:s.Deferred(),l=f.promise();if(r>1){for(;n<r;n++)t[n]&&t[n].promise&&s.isFunction(t[n].promise)?t[n].promise().then(c(n),f.reject,h(n)):--o;o||f.resolveWith(f,t)}else f!==e&&f.resolveWith(f,r?[e]:[]);return l}}),s.support=function(){var t,r,i,o,u,a,f,l,c,h,p,d,v=n.createElement("div"),m=n.documentElement;v.setAttribute("className","t"),v.innerHTML="   <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/>",r=v.getElementsByTagName("*"),i=v.getElementsByTagName("a")[0];if(!r||!r.length||!i)return{};o=n.createElement("select"),u=o.appendChild(n.createElement("option")),a=v.getElementsByTagName("input")[0],t={leadingWhitespace:v.firstChild.nodeType===3,tbody:!v.getElementsByTagName("tbody").length,htmlSerialize:!!v.getElementsByTagName("link").length,style:/top/.test(i.getAttribute("style")),hrefNormalized:i.getAttribute("href")==="/a",opacity:/^0.55/.test(i.style.opacity),cssFloat:!!i.style.cssFloat,checkOn:a.value==="on",optSelected:u.selected,getSetAttribute:v.className!=="t",enctype:!!n.createElement("form").enctype,html5Clone:n.createElement("nav").cloneNode(!0).outerHTML!=="<:nav></:nav>",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,pixelMargin:!0},s.boxModel=t.boxModel=n.compatMode==="CSS1Compat",a.checked=!0,t.noCloneChecked=a.cloneNode(!0).checked,o.disabled=!0,t.optDisabled=!u.disabled;try{delete v.test}catch(g){t.deleteExpando=!1}!v.addEventListener&&v.attachEvent&&v.fireEvent&&(v.attachEvent("onclick",function(){t.noCloneEvent=!1}),v.cloneNode(!0).fireEvent("onclick")),a=n.createElement("input"),a.value="t",a.setAttribute("type","radio"),t.radioValue=a.value==="t",a.setAttribute("checked","checked"),a.setAttribute("name","t"),v.appendChild(a),f=n.createDocumentFragment(),f.appendChild(v.lastChild),t.checkClone=f.cloneNode(!0).cloneNode(!0).lastChild.checked,t.appendChecked=a.checked,f.removeChild(a),f.appendChild(v);if(v.attachEvent)for(p in{submit:1,change:1,focusin:1})h="on"+p,d=h in v,d||(v.setAttribute(h,"return;"),d=typeof v[h]=="function"),t[p+"Bubbles"]=d;return f.removeChild(v),f=o=u=v=a=null,s(function(){var r,i,o,u,a,f,c,h,p,m,g,y,b,w=n.getElementsByTagName("body")[0];if(!w)return;h=1,b="padding:0;margin:0;border:",g="position:absolute;top:0;left:0;width:1px;height:1px;",y=b+"0;visibility:hidden;",p="style='"+g+b+"5px solid #000;",m="<div "+p+"display:block;'><div style='"+b+"0;display:block;overflow:hidden;'></div></div>"+"<table "+p+"' cellpadding='0' cellspacing='0'>"+"<tr><td></td></tr></table>",r=n.createElement("div"),r.style.cssText=y+"width:0;height:0;position:static;top:0;margin-top:"+h+"px",w.insertBefore(r,w.firstChild),v=n.createElement("div"),r.appendChild(v),v.innerHTML="<table><tr><td style='"+b+"0;display:none'></td><td>t</td></tr></table>",l=v.getElementsByTagName("td"),d=l[0].offsetHeight===0,l[0].style.display="",l[1].style.display="none",t.reliableHiddenOffsets=d&&l[0].offsetHeight===0,e.getComputedStyle&&(v.innerHTML="",c=n.createElement("div"),c.style.width="0",c.style.marginRight="0",v.style.width="2px",v.appendChild(c),t.reliableMarginRight=(parseInt((e.getComputedStyle(c,null)||{marginRight:0}).marginRight,10)||0)===0),typeof v.style.zoom!="undefined"&&(v.innerHTML="",v.style.width=v.style.padding="1px",v.style.border=0,v.style.overflow="hidden",v.style.display="inline",v.style.zoom=1,t.inlineBlockNeedsLayout=v.offsetWidth===3,v.style.display="block",v.style.overflow="visible",v.innerHTML="<div style='width:5px;'></div>",t.shrinkWrapBlocks=v.offsetWidth!==3),v.style.cssText=g+y,v.innerHTML=m,i=v.firstChild,o=i.firstChild,a=i.nextSibling.firstChild.firstChild,f={doesNotAddBorder:o.offsetTop!==5,doesAddBorderForTableAndCells:a.offsetTop===5},o.style.position="fixed",o.style.top="20px",f.fixedPosition=o.offsetTop===20||o.offsetTop===15,o.style.position=o.style.top="",i.style.overflow="hidden",i.style.position="relative",f.subtractsBorderForOverflowNotVisible=o.offsetTop===-5,f.doesNotIncludeMarginInBodyOffset=w.offsetTop!==h,e.getComputedStyle&&(v.style.marginTop="1%",t.pixelMargin=(e.getComputedStyle(v,null)||{marginTop:0}).marginTop!=="1%"),typeof r.style.zoom!="undefined"&&(r.style.zoom=1),w.removeChild(r),c=v=r=null,s.extend(t,f)}),t}();var f=/^(?:\{.*\}|\[.*\])$/,l=/([A-Z])/g;s.extend({cache:{},uuid:0,expando:"jQuery"+(s.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(e){return e=e.nodeType?s.cache[e[s.expando]]:e[s.expando],!!e&&!h(e)},data:function(e,n,r,i){if(!s.acceptData(e))return;var o,u,a,f=s.expando,l=typeof n=="string",c=e.nodeType,h=c?s.cache:e,p=c?e[f]:e[f]&&f,d=n==="events";if((!p||!h[p]||!d&&!i&&!h[p].data)&&l&&r===t)return;p||(c?e[f]=p=++s.uuid:p=f),h[p]||(h[p]={},c||(h[p].toJSON=s.noop));if(typeof n=="object"||typeof n=="function")i?h[p]=s.extend(h[p],n):h[p].data=s.extend(h[p].data,n);return o=u=h[p],i||(u.data||(u.data={}),u=u.data),r!==t&&(u[s.camelCase(n)]=r),d&&!u[n]?o.events:(l?(a=u[n],a==null&&(a=u[s.camelCase(n)])):a=u,a)},removeData:function(e,t,n){if(!s.acceptData(e))return;var r,i,o,u=s.expando,a=e.nodeType,f=a?s.cache:e,l=a?e[u]:u;if(!f[l])return;if(t){r=n?f[l]:f[l].data;if(r){s.isArray(t)||(t in r?t=[t]:(t=s.camelCase(t),t in r?t=[t]:t=t.split(" ")));for(i=0,o=t.length;i<o;i++)delete r[t[i]];if(!(n?h:s.isEmptyObject)(r))return}}if(!n){delete f[l].data;if(!h(f[l]))return}s.support.deleteExpando||!f.setInterval?delete f[l]:f[l]=null,a&&(s.support.deleteExpando?delete e[u]:e.removeAttribute?e.removeAttribute(u):e[u]=null)},_data:function(e,t,n){return s.data(e,t,n,!0)},acceptData:function(e){if(e.nodeName){var t=s.noData[e.nodeName.toLowerCase()];if(t)return t!==!0&&e.getAttribute("classid")===t}return!0}}),s.fn.extend({data:function(e,n){var r,i,o,u,a,f=this[0],l=0,h=null;if(e===t){if(this.length){h=s.data(f);if(f.nodeType===1&&!s._data(f,"parsedAttrs")){o=f.attributes;for(a=o.length;l<a;l++)u=o[l].name,u.indexOf("data-")===0&&(u=s.camelCase(u.substring(5)),c(f,u,h[u]));s._data(f,"parsedAttrs",!0)}}return h}return typeof e=="object"?this.each(function(){s.data(this,e)}):(r=e.split(".",2),r[1]=r[1]?"."+r[1]:"",i=r[1]+"!",s.access(this,function(n){if(n===t)return h=this.triggerHandler("getData"+i,[r[0]]),h===t&&f&&(h=s.data(f,e),h=c(f,e,h)),h===t&&r[1]?this.data(r[0]):h;r[1]=n,this.each(function(){var t=s(this);t.triggerHandler("setData"+i,r),s.data(this,e,n),t.triggerHandler("changeData"+i,r)})},null,n,arguments.length>1,null,!1))},removeData:function(e){return this.each(function(){s.removeData(this,e)})}}),s.extend({_mark:function(e,t){e&&(t=(t||"fx")+"mark",s._data(e,t,(s._data(e,t)||0)+1))},_unmark:function(e,t,n){e!==!0&&(n=t,t=e,e=!1);if(t){n=n||"fx";var r=n+"mark",i=e?0:(s._data(t,r)||1)-1;i?s._data(t,r,i):(s.removeData(t,r,!0),p(t,n,"mark"))}},queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=s._data(e,t),n&&(!r||s.isArray(n)?r=s._data(e,t,s.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=s.queue(e,t),r=n.shift(),i={};r==="inprogress"&&(r=n.shift()),r&&(t==="fx"&&n.unshift("inprogress"),s._data(e,t+".run",i),r.call(e,function(){s.dequeue(e,t)},i)),n.length||(s.removeData(e,t+"queue "+t+".run",!0),p(e,t,"queue"))}}),s.fn.extend({queue:function(e,n){var r=2;return typeof e!="string"&&(n=e,e="fx",r--),arguments.length<r?s.queue(this[0],e):n===t?this:this.each(function(){var t=s.queue(this,e,n);e==="fx"&&t[0]!=="inprogress"&&s.dequeue(this,e)})},dequeue:function(e){return this.each(function(){s.dequeue(this,e)})},delay:function(e,t){return e=s.fx?s.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var r=setTimeout(t,e);n.stop=function(){clearTimeout(r)}})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,n){function h(){--u||r.resolveWith(i,[i])}typeof e!="string"&&(n=e,e=t),e=e||"fx";var r=s.Deferred(),i=this,o=i.length,u=1,a=e+"defer",f=e+"queue",l=e+"mark",c;while(o--)if(c=s.data(i[o],a,t,!0)||(s.data(i[o],f,t,!0)||s.data(i[o],l,t,!0))&&s.data(i[o],a,s.Callbacks("once memory"),!0))u++,c.add(h);return h(),r.promise(n)}});var d=/[\n\t\r]/g,v=/\s+/,m=/\r/g,g=/^(?:button|input)$/i,y=/^(?:button|input|object|select|textarea)$/i,b=/^a(?:rea)?$/i,w=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,E=s.support.getSetAttribute,S,x,T;s.fn.extend({attr:function(e,t){return s.access(this,s.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){s.removeAttr(this,e)})},prop:function(e,t){return s.access(this,s.prop,e,t,arguments.length>1)},removeProp:function(e){return e=s.propFix[e]||e,this.each(function(){try{this[e]=t,delete this[e]}catch(n){}})},addClass:function(e){var t,n,r,i,o,u,a;if(s.isFunction(e))return this.each(function(t){s(this).addClass(e.call(this,t,this.className))});if(e&&typeof e=="string"){t=e.split(v);for(n=0,r=this.length;n<r;n++){i=this[n];if(i.nodeType===1)if(!i.className&&t.length===1)i.className=e;else{o=" "+i.className+" ";for(u=0,a=t.length;u<a;u++)~o.indexOf(" "+t[u]+" ")||(o+=t[u]+" ");i.className=s.trim(o)}}}return this},removeClass:function(e){var n,r,i,o,u,a,f;if(s.isFunction(e))return this.each(function(t){s(this).removeClass(e.call(this,t,this.className))});if(e&&typeof e=="string"||e===t){n=(e||"").split(v);for(r=0,i=this.length;r<i;r++){o=this[r];if(o.nodeType===1&&o.className)if(e){u=(" "+o.className+" ").replace(d," ");for(a=0,f=n.length;a<f;a++)u=u.replace(" "+n[a]+" "," ");o.className=s.trim(u)}else o.className=""}}return this},toggleClass:function(e,t){var n=typeof e,r=typeof t=="boolean";return s.isFunction(e)?this.each(function(n){s(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if(n==="string"){var i,o=0,u=s(this),a=t,f=e.split(v);while(i=f[o++])a=r?a:!u.hasClass(i),u[a?"addClass":"removeClass"](i)}else if(n==="undefined"||n==="boolean")this.className&&s._data(this,"__className__",this.className),this.className=this.className||e===!1?"":s._data(this,"__className__")||""})},hasClass:function(e){var t=" "+e+" ",n=0,r=this.length;for(;n<r;n++)if(this[n].nodeType===1&&(" "+this[n].className+" ").replace(d," ").indexOf(t)>-1)return!0;return!1},val:function(e){var n,r,i,o=this[0];if(!arguments.length){if(o)return n=s.valHooks[o.type]||s.valHooks[o.nodeName.toLowerCase()],n&&"get"in n&&(r=n.get(o,"value"))!==t?r:(r=o.value,typeof r=="string"?r.replace(m,""):r==null?"":r);return}return i=s.isFunction(e),this.each(function(r){var o=s(this),u;if(this.nodeType!==1)return;i?u=e.call(this,r,o.val()):u=e,u==null?u="":typeof u=="number"?u+="":s.isArray(u)&&(u=s.map(u,function(e){return e==null?"":e+""})),n=s.valHooks[this.type]||s.valHooks[this.nodeName.toLowerCase()];if(!n||!("set"in n)||n.set(this,u,"value")===t)this.value=u})}}),s.extend({valHooks:{option:{get:function(e){var t=e.attributes.value;return!t||t.specified?e.value:e.text}},select:{get:function(e){var t,n,r,i,o=e.selectedIndex,u=[],a=e.options,f=e.type==="select-one";if(o<0)return null;n=f?o:0,r=f?o+1:a.length;for(;n<r;n++){i=a[n];if(i.selected&&(s.support.optDisabled?!i.disabled:i.getAttribute("disabled")===null)&&(!i.parentNode.disabled||!s.nodeName(i.parentNode,"optgroup"))){t=s(i).val();if(f)return t;u.push(t)}}return f&&!u.length&&a.length?s(a[o]).val():u},set:function(e,t){var n=s.makeArray(t);return s(e).find("option").each(function(){this.selected=s.inArray(s(this).val(),n)>=0}),n.length||(e.selectedIndex=-1),n}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attr:function(e,n,r,i){var o,u,a,f=e.nodeType;if(!e||f===3||f===8||f===2)return;if(i&&n in s.attrFn)return s(e)[n](r);if(typeof e.getAttribute=="undefined")return s.prop(e,n,r);a=f!==1||!s.isXMLDoc(e),a&&(n=n.toLowerCase(),u=s.attrHooks[n]||(w.test(n)?x:S));if(r!==t){if(r===null){s.removeAttr(e,n);return}return u&&"set"in u&&a&&(o=u.set(e,r,n))!==t?o:(e.setAttribute(n,""+r),r)}return u&&"get"in u&&a&&(o=u.get(e,n))!==null?o:(o=e.getAttribute(n),o===null?t:o)},removeAttr:function(e,t){var n,r,i,o,u,a=0;if(t&&e.nodeType===1){r=t.toLowerCase().split(v),o=r.length;for(;a<o;a++)i=r[a],i&&(n=s.propFix[i]||i,u=w.test(i),u||s.attr(e,i,""),e.removeAttribute(E?i:n),u&&n in e&&(e[n]=!1))}},attrHooks:{type:{set:function(e,t){if(g.test(e.nodeName)&&e.parentNode)s.error("type property can't be changed");else if(!s.support.radioValue&&t==="radio"&&s.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}},value:{get:function(e,t){return S&&s.nodeName(e,"button")?S.get(e,t):t in e?e.value:null},set:function(e,t,n){if(S&&s.nodeName(e,"button"))return S.set(e,t,n);e.value=t}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(e,n,r){var i,o,u,a=e.nodeType;if(!e||a===3||a===8||a===2)return;return u=a!==1||!s.isXMLDoc(e),u&&(n=s.propFix[n]||n,o=s.propHooks[n]),r!==t?o&&"set"in o&&(i=o.set(e,r,n))!==t?i:e[n]=r:o&&"get"in o&&(i=o.get(e,n))!==null?i:e[n]},propHooks:{tabIndex:{get:function(e){var n=e.getAttributeNode("tabindex");return n&&n.specified?parseInt(n.value,10):y.test(e.nodeName)||b.test(e.nodeName)&&e.href?0:t}}}}),s.attrHooks.tabindex=s.propHooks.tabIndex,x={get:function(e,n){var r,i=s.prop(e,n);return i===!0||typeof i!="boolean"&&(r=e.getAttributeNode(n))&&r.nodeValue!==!1?n.toLowerCase():t},set:function(e,t,n){var r;return t===!1?s.removeAttr(e,n):(r=s.propFix[n]||n,r in e&&(e[r]=!0),e.setAttribute(n,n.toLowerCase())),n}},E||(T={name:!0,id:!0,coords:!0},S=s.valHooks.button={get:function(e,n){var r;return r=e.getAttributeNode(n),r&&(T[n]?r.nodeValue!=="":r.specified)?r.nodeValue:t},set:function(e,t,r){var i=e.getAttributeNode(r);return i||(i=n.createAttribute(r),e.setAttributeNode(i)),i.nodeValue=t+""}},s.attrHooks.tabindex.set=S.set,s.each(["width","height"],function(e,t){s.attrHooks[t]=s.extend(s.attrHooks[t],{set:function(e,n){if(n==="")return e.setAttribute(t,"auto"),n}})}),s.attrHooks.contenteditable={get:S.get,set:function(e,t,n){t===""&&(t="false"),S.set(e,t,n)}}),s.support.hrefNormalized||s.each(["href","src","width","height"],function(e,n){s.attrHooks[n]=s.extend(s.attrHooks[n],{get:function(e){var r=e.getAttribute(n,2);return r===null?t:r}})}),s.support.style||(s.attrHooks.style={get:function(e){return e.style.cssText.toLowerCase()||t},set:function(e,t){return e.style.cssText=""+t}}),s.support.optSelected||(s.propHooks.selected=s.extend(s.propHooks.selected,{get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}})),s.support.enctype||(s.propFix.enctype="encoding"),s.support.checkOn||s.each(["radio","checkbox"],function(){s.valHooks[this]={get:function(e){return e.getAttribute("value")===null?"on":e.value}}}),s.each(["radio","checkbox"],function(){s.valHooks[this]=s.extend(s.valHooks[this],{set:function(e,t){if(s.isArray(t))return e.checked=s.inArray(s(e).val(),t)>=0}})});var N=/^(?:textarea|input|select)$/i,C=/^([^\.]*)?(?:\.(.+))?$/,k=/(?:^|\s)hover(\.\S+)?\b/,L=/^key/,A=/^(?:mouse|contextmenu)|click/,O=/^(?:focusinfocus|focusoutblur)$/,M=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,_=function(e){var t=M.exec(e);return t&&(t[1]=(t[1]||"").toLowerCase(),t[3]=t[3]&&new RegExp("(?:^|\\s)"+t[3]+"(?:\\s|$)")),t},D=function(e,t){var n=e.attributes||{};return(!t[1]||e.nodeName.toLowerCase()===t[1])&&(!t[2]||(n.id||{}).value===t[2])&&(!t[3]||t[3].test((n["class"]||{}).value))},P=function(e){return s.event.special.hover?e:e.replace(k,"mouseenter$1 mouseleave$1")};s.event={add:function(e,n,r,i,o){var u,a,f,l,c,h,p,d,v,m,g,y;if(e.nodeType===3||e.nodeType===8||!n||!r||!(u=s._data(e)))return;r.handler&&(v=r,r=v.handler,o=v.selector),r.guid||(r.guid=s.guid++),f=u.events,f||(u.events=f={}),a=u.handle,a||(u.handle=a=function(e){return typeof s=="undefined"||!!e&&s.event.triggered===e.type?t:s.event.dispatch.apply(a.elem,arguments)},a.elem=e),n=s.trim(P(n)).split(" ");for(l=0;l<n.length;l++){c=C.exec(n[l])||[],h=c[1],p=(c[2]||"").split(".").sort(),y=s.event.special[h]||{},h=(o?y.delegateType:y.bindType)||h,y=s.event.special[h]||{},d=s.extend({type:h,origType:c[1],data:i,handler:r,guid:r.guid,selector:o,quick:o&&_(o),namespace:p.join(".")},v),g=f[h];if(!g){g=f[h]=[],g.delegateCount=0;if(!y.setup||y.setup.call(e,i,p,a)===!1)e.addEventListener?e.addEventListener(h,a,!1):e.attachEvent&&e.attachEvent("on"+h,a)}y.add&&(y.add.call(e,d),d.handler.guid||(d.handler.guid=r.guid)),o?g.splice(g.delegateCount++,0,d):g.push(d),s.event.global[h]=!0}e=null},global:{},remove:function(e,t,n,r,i){var o=s.hasData(e)&&s._data(e),u,a,f,l,c,h,p,d,v,m,g,y;if(!o||!(d=o.events))return;t=s.trim(P(t||"")).split(" ");for(u=0;u<t.length;u++){a=C.exec(t[u])||[],f=l=a[1],c=a[2];if(!f){for(f in d)s.event.remove(e,f+t[u],n,r,!0);continue}v=s.event.special[f]||{},f=(r?v.delegateType:v.bindType)||f,g=d[f]||[],h=g.length,c=c?new RegExp("(^|\\.)"+c.split(".").sort().join("\\.(?:.*\\.)?")+"(\\.|$)"):null;for(p=0;p<g.length;p++)y=g[p],(i||l===y.origType)&&(!n||n.guid===y.guid)&&(!c||c.test(y.namespace))&&(!r||r===y.selector||r==="**"&&y.selector)&&(g.splice(p--,1),y.selector&&g.delegateCount--,v.remove&&v.remove.call(e,y));g.length===0&&h!==g.length&&((!v.teardown||v.teardown.call(e,c)===!1)&&s.removeEvent(e,f,o.handle),delete d[f])}s.isEmptyObject(d)&&(m=o.handle,m&&(m.elem=null),s.removeData(e,["events","handle"],!0))},customEvent:{getData:!0,setData:!0,changeData:!0},trigger:function(n,r,i,o){if(!i||i.nodeType!==3&&i.nodeType!==8){var u=n.type||n,a=[],f,l,c,h,p,d,v,m,g,y;if(O.test(u+s.event.triggered))return;u.indexOf("!")>=0&&(u=u.slice(0,-1),l=!0),u.indexOf(".")>=0&&(a=u.split("."),u=a.shift(),a.sort());if((!i||s.event.customEvent[u])&&!s.event.global[u])return;n=typeof n=="object"?n[s.expando]?n:new s.Event(u,n):new s.Event(u),n.type=u,n.isTrigger=!0,n.exclusive=l,n.namespace=a.join("."),n.namespace_re=n.namespace?new RegExp("(^|\\.)"+a.join("\\.(?:.*\\.)?")+"(\\.|$)"):null,d=u.indexOf(":")<0?"on"+u:"";if(!i){f=s.cache;for(c in f)f[c].events&&f[c].events[u]&&s.event.trigger(n,r,f[c].handle.elem,!0);return}n.result=t,n.target||(n.target=i),r=r!=null?s.makeArray(r):[],r.unshift(n),v=s.event.special[u]||{};if(v.trigger&&v.trigger.apply(i,r)===!1)return;g=[[i,v.bindType||u]];if(!o&&!v.noBubble&&!s.isWindow(i)){y=v.delegateType||u,h=O.test(y+u)?i:i.parentNode,p=null;for(;h;h=h.parentNode)g.push([h,y]),p=h;p&&p===i.ownerDocument&&g.push([p.defaultView||p.parentWindow||e,y])}for(c=0;c<g.length&&!n.isPropagationStopped();c++)h=g[c][0],n.type=g[c][1],m=(s._data(h,"events")||{})[n.type]&&s._data(h,"handle"),m&&m.apply(h,r),m=d&&h[d],m&&s.acceptData(h)&&m.apply(h,r)===!1&&n.preventDefault();return n.type=u,!o&&!n.isDefaultPrevented()&&(!v._default||v._default.apply(i.ownerDocument,r)===!1)&&(u!=="click"||!s.nodeName(i,"a"))&&s.acceptData(i)&&d&&i[u]&&(u!=="focus"&&u!=="blur"||n.target.offsetWidth!==0)&&!s.isWindow(i)&&(p=i[d],p&&(i[d]=null),s.event.triggered=u,i[u](),s.event.triggered=t,p&&(i[d]=p)),n.result}return},dispatch:function(n){n=s.event.fix(n||e.event);var r=(s._data(this,"events")||{})[n.type]||[],i=r.delegateCount,o=[].slice.call(arguments,0),u=!n.exclusive&&!n.namespace,a=s.event.special[n.type]||{},f=[],l,c,h,p,d,v,m,g,y,b,w;o[0]=n,n.delegateTarget=this;if(a.preDispatch&&a.preDispatch.call(this,n)===!1)return;if(i&&(!n.button||n.type!=="click")){p=s(this),p.context=this.ownerDocument||this;for(h=n.target;h!=this;h=h.parentNode||this)if(h.disabled!==!0){v={},g=[],p[0]=h;for(l=0;l<i;l++)y=r[l],b=y.selector,v[b]===t&&(v[b]=y.quick?D(h,y.quick):p.is(b)),v[b]&&g.push(y);g.length&&f.push({elem:h,matches:g})}}r.length>i&&f.push({elem:this,matches:r.slice(i)});for(l=0;l<f.length&&!n.isPropagationStopped();l++){m=f[l],n.currentTarget=m.elem;for(c=0;c<m.matches.length&&!n.isImmediatePropagationStopped();c++){y=m.matches[c];if(u||!n.namespace&&!y.namespace||n.namespace_re&&n.namespace_re.test(y.namespace))n.data=y.data,n.handleObj=y,d=((s.event.special[y.origType]||{}).handle||y.handler).apply(m.elem,o),d!==t&&(n.result=d,d===!1&&(n.preventDefault(),n.stopPropagation()))}}return a.postDispatch&&a.postDispatch.call(this,n),n.result},props:"attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return e.which==null&&(e.which=t.charCode!=null?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,r){var i,s,o,u=r.button,a=r.fromElement;return e.pageX==null&&r.clientX!=null&&(i=e.target.ownerDocument||n,s=i.documentElement,o=i.body,e.pageX=r.clientX+(s&&s.scrollLeft||o&&o.scrollLeft||0)-(s&&s.clientLeft||o&&o.clientLeft||0),e.pageY=r.clientY+(s&&s.scrollTop||o&&o.scrollTop||0)-(s&&s.clientTop||o&&o.clientTop||0)),!e.relatedTarget&&a&&(e.relatedTarget=a===e.target?r.toElement:a),!e.which&&u!==t&&(e.which=u&1?1:u&2?3:u&4?2:0),e}},fix:function(e){if(e[s.expando])return e;var r,i,o=e,u=s.event.fixHooks[e.type]||{},a=u.props?this.props.concat(u.props):this.props;e=s.Event(o);for(r=a.length;r;)i=a[--r],e[i]=o[i];return e.target||(e.target=o.srcElement||n),e.target.nodeType===3&&(e.target=e.target.parentNode),e.metaKey===t&&(e.metaKey=e.ctrlKey),u.filter?u.filter(e,o):e},special:{ready:{setup:s.bindReady},load:{noBubble:!0},focus:{delegateType:"focusin"},blur:{delegateType:"focusout"},beforeunload:{setup:function(e,t,n){s.isWindow(this)&&(this.onbeforeunload=n)},teardown:function(e,t){this.onbeforeunload===t&&(this.onbeforeunload=null)}}},simulate:function(e,t,n,r){var i=s.extend(new s.Event,n,{type:e,isSimulated:!0,originalEvent:{}});r?s.event.trigger(i,null,t):s.event.dispatch.call(t,i),i.isDefaultPrevented()&&n.preventDefault()}},s.event.handle=s.event.dispatch,s.removeEvent=n.removeEventListener?function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)}:function(e,t,n){e.detachEvent&&e.detachEvent("on"+t,n)},s.Event=function(e,t){if(!(this instanceof s.Event))return new s.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||e.returnValue===!1||e.getPreventDefault&&e.getPreventDefault()?B:H):this.type=e,t&&s.extend(this,t),this.timeStamp=e&&e.timeStamp||s.now(),this[s.expando]=!0},s.Event.prototype={preventDefault:function(){this.isDefaultPrevented=B;var e=this.originalEvent;if(!e)return;e.preventDefault?e.preventDefault():e.returnValue=!1},stopPropagation:function(){this.isPropagationStopped=B;var e=this.originalEvent;if(!e)return;e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=B,this.stopPropagation()},isDefaultPrevented:H,isPropagationStopped:H,isImmediatePropagationStopped:H},s.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(e,t){s.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n=this,r=e.relatedTarget,i=e.handleObj,o=i.selector,u;if(!r||r!==n&&!s.contains(n,r))e.type=i.origType,u=i.handler.apply(this,arguments),e.type=t;return u}}}),s.support.submitBubbles||(s.event.special.submit={setup:function(){if(s.nodeName(this,"form"))return!1;s.event.add(this,"click._submit keypress._submit",function(e){var n=e.target,r=s.nodeName(n,"input")||s.nodeName(n,"button")?n.form:t;r&&!r._submit_attached&&(s.event.add(r,"submit._submit",function(e){e._submit_bubble=!0}),r._submit_attached=!0)})},postDispatch:function(e){e._submit_bubble&&(delete e._submit_bubble,this.parentNode&&!e.isTrigger&&s.event.simulate("submit",this.parentNode,e,!0))},teardown:function(){if(s.nodeName(this,"form"))return!1;s.event.remove(this,"._submit")}}),s.support.changeBubbles||(s.event.special.change={setup:function(){if(N.test(this.nodeName)){if(this.type==="checkbox"||this.type==="radio")s.event.add(this,"propertychange._change",function(e){e.originalEvent.propertyName==="checked"&&(this._just_changed=!0)}),s.event.add(this,"click._change",function(e){this._just_changed&&!e.isTrigger&&(this._just_changed=!1,s.event.simulate("change",this,e,!0))});return!1}s.event.add(this,"beforeactivate._change",function(e){var t=e.target;N.test(t.nodeName)&&!t._change_attached&&(s.event.add(t,"change._change",function(e){this.parentNode&&!e.isSimulated&&!e.isTrigger&&s.event.simulate("change",this.parentNode,e,!0)}),t._change_attached=!0)})},handle:function(e){var t=e.target;if(this!==t||e.isSimulated||e.isTrigger||t.type!=="radio"&&t.type!=="checkbox")return e.handleObj.handler.apply(this,arguments)},teardown:function(){return s.event.remove(this,"._change"),N.test(this.nodeName)}}),s.support.focusinBubbles||s.each({focus:"focusin",blur:"focusout"},function(e,t){var r=0,i=function(e){s.event.simulate(t,e.target,s.event.fix(e),!0)};s.event.special[t]={setup:function(){r++===0&&n.addEventListener(e,i,!0)},teardown:function(){--r===0&&n.removeEventListener(e,i,!0)}}}),s.fn.extend({on:function(e,n,r,i,o){var u,a;if(typeof e=="object"){typeof n!="string"&&(r=r||n,n=t);for(a in e)this.on(a,n,r,e[a],o);return this}r==null&&i==null?(i=n,r=n=t):i==null&&(typeof n=="string"?(i=r,r=t):(i=r,r=n,n=t));if(i===!1)i=H;else if(!i)return this;return o===1&&(u=i,i=function(e){return s().off(e),u.apply(this,arguments)},i.guid=u.guid||(u.guid=s.guid++)),this.each(function(){s.event.add(this,e,i,r,n)})},one:function(e,t,n,r){return this.on(e,t,n,r,1)},off:function(e,n,r){if(e&&e.preventDefault&&e.handleObj){var i=e.handleObj;return s(e.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this}if(typeof e=="object"){for(var o in e)this.off(o,n,e[o]);return this}if(n===!1||typeof n=="function")r=n,n=t;return r===!1&&(r=H),this.each(function(){s.event.remove(this,e,r,n)})},bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},live:function(e,t,n){return s(this.context).on(e,this.selector,t,n),this},die:function(e,t){return s(this.context).off(e,this.selector||"**",t),this},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return arguments.length==1?this.off(e,"**"):this.off(t,e,n)},trigger:function(e,t){return this.each(function(){s.event.trigger(e,t,this)})},triggerHandler:function(e,t){if(this[0])return s.event.trigger(e,t,this[0],!0)},toggle:function(e){var t=arguments,n=e.guid||s.guid++,r=0,i=function(n){var i=(s._data(this,"lastToggle"+e.guid)||0)%r;return s._data(this,"lastToggle"+e.guid,i+1),n.preventDefault(),t[i].apply(this,arguments)||!1};i.guid=n;while(r<t.length)t[r++].guid=n;return this.click(i)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),s.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,t){s.fn[t]=function(e,n){return n==null&&(n=e,e=null),arguments.length>0?this.on(t,null,e,n):this.trigger(t)},s.attrFn&&(s.attrFn[t]=!0),L.test(t)&&(s.event.fixHooks[t]=s.event.keyHooks),A.test(t)&&(s.event.fixHooks[t]=s.event.mouseHooks)}),function(){function S(e,t,n,i,s,o){for(var u=0,a=i.length;u<a;u++){var f=i[u];if(f){var l=!1;f=f[e];while(f){if(f[r]===n){l=i[f.sizset];break}f.nodeType===1&&!o&&(f[r]=n,f.sizset=u);if(f.nodeName.toLowerCase()===t){l=f;break}f=f[e]}i[u]=l}}}function x(e,t,n,i,s,o){for(var u=0,a=i.length;u<a;u++){var f=i[u];if(f){var l=!1;f=f[e];while(f){if(f[r]===n){l=i[f.sizset];break}if(f.nodeType===1){o||(f[r]=n,f.sizset=u);if(typeof t!="string"){if(f===t){l=!0;break}}else if(h.filter(t,[f]).length>0){l=f;break}}f=f[e]}i[u]=l}}}var e=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,r="sizcache"+(Math.random()+"").replace(".",""),i=0,o=Object.prototype.toString,u=!1,a=!0,f=/\\/g,l=/\r\n/g,c=/\W/;[0,0].sort(function(){return a=!1,0});var h=function(t,r,i,s){i=i||[],r=r||n;var u=r;if(r.nodeType!==1&&r.nodeType!==9)return[];if(!t||typeof t!="string")return i;var a,f,l,c,p,m,g,b,w=!0,E=h.isXML(r),S=[],x=t;do{e.exec(""),a=e.exec(x);if(a){x=a[3],S.push(a[1]);if(a[2]){c=a[3];break}}}while(a);if(S.length>1&&v.exec(t))if(S.length===2&&d.relative[S[0]])f=T(S[0]+S[1],r,s);else{f=d.relative[S[0]]?[r]:h(S.shift(),r);while(S.length)t=S.shift(),d.relative[t]&&(t+=S.shift()),f=T(t,f,s)}else{!s&&S.length>1&&r.nodeType===9&&!E&&d.match.ID.test(S[0])&&!d.match.ID.test(S[S.length-1])&&(p=h.find(S.shift(),r,E),r=p.expr?h.filter(p.expr,p.set)[0]:p.set[0]);if(r){p=s?{expr:S.pop(),set:y(s)}:h.find(S.pop(),S.length!==1||S[0]!=="~"&&S[0]!=="+"||!r.parentNode?r:r.parentNode,E),f=p.expr?h.filter(p.expr,p.set):p.set,S.length>0?l=y(f):w=!1;while(S.length)m=S.pop(),g=m,d.relative[m]?g=S.pop():m="",g==null&&(g=r),d.relative[m](l,g,E)}else l=S=[]}l||(l=f),l||h.error(m||t);if(o.call(l)==="[object Array]")if(!w)i.push.apply(i,l);else if(r&&r.nodeType===1)for(b=0;l[b]!=null;b++)l[b]&&(l[b]===!0||l[b].nodeType===1&&h.contains(r,l[b]))&&i.push(f[b]);else for(b=0;l[b]!=null;b++)l[b]&&l[b].nodeType===1&&i.push(f[b]);else y(l,i);return c&&(h(c,u,i,s),h.uniqueSort(i)),i};h.uniqueSort=function(e){if(w){u=a,e.sort(w);if(u)for(var t=1;t<e.length;t++)e[t]===e[t-1]&&e.splice(t--,1)}return e},h.matches=function(e,t){return h(e,null,null,t)},h.matchesSelector=function(e,t){return h(t,null,null,[e]).length>0},h.find=function(e,t,n){var r,i,s,o,u,a;if(!e)return[];for(i=0,s=d.order.length;i<s;i++){u=d.order[i];if(o=d.leftMatch[u].exec(e)){a=o[1],o.splice(1,1);if(a.substr(a.length-1)!=="\\"){o[1]=(o[1]||"").replace(f,""),r=d.find[u](o,t,n);if(r!=null){e=e.replace(d.match[u],"");break}}}}return r||(r=typeof t.getElementsByTagName!="undefined"?t.getElementsByTagName("*"):[]),{set:r,expr:e}},h.filter=function(e,n,r,i){var s,o,u,a,f,l,c,p,v,m=e,g=[],y=n,b=n&&n[0]&&h.isXML(n[0]);while(e&&n.length){for(u in d.filter)if((s=d.leftMatch[u].exec(e))!=null&&s[2]){l=d.filter[u],c=s[1],o=!1,s.splice(1,1);if(c.substr(c.length-1)==="\\")continue;y===g&&(g=[]);if(d.preFilter[u]){s=d.preFilter[u](s,y,r,g,i,b);if(!s)o=a=!0;else if(s===!0)continue}if(s)for(p=0;(f=y[p])!=null;p++)f&&(a=l(f,s,p,y),v=i^a,r&&a!=null?v?o=!0:y[p]=!1:v&&(g.push(f),o=!0));if(a!==t){r||(y=g),e=e.replace(d.match[u],"");if(!o)return[];break}}if(e===m){if(o!=null)break;h.error(e)}m=e}return y},h.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)};var p=h.getText=function(e){var t,n,r=e.nodeType,i="";if(r){if(r===1||r===9||r===11){if(typeof e.textContent=="string")return e.textContent;if(typeof e.innerText=="string")return e.innerText.replace(l,"");for(e=e.firstChild;e;e=e.nextSibling)i+=p(e)}else if(r===3||r===4)return e.nodeValue}else for(t=0;n=e[t];t++)n.nodeType!==8&&(i+=p(n));return i},d=h.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(e){return e.getAttribute("href")},type:function(e){return e.getAttribute("type")}},relative:{"+":function(e,t){var n=typeof t=="string",r=n&&!c.test(t),i=n&&!r;r&&(t=t.toLowerCase());for(var s=0,o=e.length,u;s<o;s++)if(u=e[s]){while((u=u.previousSibling)&&u.nodeType!==1);e[s]=i||u&&u.nodeName.toLowerCase()===t?u||!1:u===t}i&&h.filter(t,e,!0)},">":function(e,t){var n,r=typeof t=="string",i=0,s=e.length;if(r&&!c.test(t)){t=t.toLowerCase();for(;i<s;i++){n=e[i];if(n){var o=n.parentNode;e[i]=o.nodeName.toLowerCase()===t?o:!1}}}else{for(;i<s;i++)n=e[i],n&&(e[i]=r?n.parentNode:n.parentNode===t);r&&h.filter(t,e,!0)}},"":function(e,t,n){var r,s=i++,o=x;typeof t=="string"&&!c.test(t)&&(t=t.toLowerCase(),r=t,o=S),o("parentNode",t,s,e,r,n)},"~":function(e,t,n){var r,s=i++,o=x;typeof t=="string"&&!c.test(t)&&(t=t.toLowerCase(),r=t,o=S),o("previousSibling",t,s,e,r,n)}},find:{ID:function(e,t,n){if(typeof t.getElementById!="undefined"&&!n){var r=t.getElementById(e[1]);return r&&r.parentNode?[r]:[]}},NAME:function(e,t){if(typeof t.getElementsByName!="undefined"){var n=[],r=t.getElementsByName(e[1]);for(var i=0,s=r.length;i<s;i++)r[i].getAttribute("name")===e[1]&&n.push(r[i]);return n.length===0?null:n}},TAG:function(e,t){if(typeof t.getElementsByTagName!="undefined")return t.getElementsByTagName(e[1])}},preFilter:{CLASS:function(e,t,n,r,i,s){e=" "+e[1].replace(f,"")+" ";if(s)return e;for(var o=0,u;(u=t[o])!=null;o++)u&&(i^(u.className&&(" "+u.className+" ").replace(/[\t\n\r]/g," ").indexOf(e)>=0)?n||r.push(u):n&&(t[o]=!1));return!1},ID:function(e){return e[1].replace(f,"")},TAG:function(e,t){return e[1].replace(f,"").toLowerCase()},CHILD:function(e){if(e[1]==="nth"){e[2]||h.error(e[0]),e[2]=e[2].replace(/^\+|\s*/g,"");var t=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(e[2]==="even"&&"2n"||e[2]==="odd"&&"2n+1"||!/\D/.test(e[2])&&"0n+"+e[2]||e[2]);e[2]=t[1]+(t[2]||1)-0,e[3]=t[3]-0}else e[2]&&h.error(e[0]);return e[0]=i++,e},ATTR:function(e,t,n,r,i,s){var o=e[1]=e[1].replace(f,"");return!s&&d.attrMap[o]&&(e[1]=d.attrMap[o]),e[4]=(e[4]||e[5]||"").replace(f,""),e[2]==="~="&&(e[4]=" "+e[4]+" "),e},PSEUDO:function(t,n,r,i,s){if(t[1]==="not"){if(!((e.exec(t[3])||"").length>1||/^\w/.test(t[3]))){var o=h.filter(t[3],n,r,!0^s);return r||i.push.apply(i,o),!1}t[3]=h(t[3],null,null,n)}else if(d.match.POS.test(t[0])||d.match.CHILD.test(t[0]))return!0;return t},POS:function(e){return e.unshift(!0),e}},filters:{enabled:function(e){return e.disabled===!1&&e.type!=="hidden"},disabled:function(e){return e.disabled===!0},checked:function(e){return e.checked===!0},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},parent:function(e){return!!e.firstChild},empty:function(e){return!e.firstChild},has:function(e,t,n){return!!h(n[3],e).length},header:function(e){return/h\d/i.test(e.nodeName)},text:function(e){var t=e.getAttribute("type"),n=e.type;return e.nodeName.toLowerCase()==="input"&&"text"===n&&(t===n||t===null)},radio:function(e){return e.nodeName.toLowerCase()==="input"&&"radio"===e.type},checkbox:function(e){return e.nodeName.toLowerCase()==="input"&&"checkbox"===e.type},file:function(e){return e.nodeName.toLowerCase()==="input"&&"file"===e.type},password:function(e){return e.nodeName.toLowerCase()==="input"&&"password"===e.type},submit:function(e){var t=e.nodeName.toLowerCase();return(t==="input"||t==="button")&&"submit"===e.type},image:function(e){return e.nodeName.toLowerCase()==="input"&&"image"===e.type},reset:function(e){var t=e.nodeName.toLowerCase();return(t==="input"||t==="button")&&"reset"===e.type},button:function(e){var t=e.nodeName.toLowerCase();return t==="input"&&"button"===e.type||t==="button"},input:function(e){return/input|select|textarea|button/i.test(e.nodeName)},focus:function(e){return e===e.ownerDocument.activeElement}},setFilters:{first:function(e,t){return t===0},last:function(e,t,n,r){return t===r.length-1},even:function(e,t){return t%2===0},odd:function(e,t){return t%2===1},lt:function(e,t,n){return t<n[3]-0},gt:function(e,t,n){return t>n[3]-0},nth:function(e,t,n){return n[3]-0===t},eq:function(e,t,n){return n[3]-0===t}},filter:{PSEUDO:function(e,t,n,r){var i=t[1],s=d.filters[i];if(s)return s(e,n,t,r);if(i==="contains")return(e.textContent||e.innerText||p([e])||"").indexOf(t[3])>=0;if(i==="not"){var o=t[3];for(var u=0,a=o.length;u<a;u++)if(o[u]===e)return!1;return!0}h.error(i)},CHILD:function(e,t){var n,i,s,o,u,a,f,l=t[1],c=e;switch(l){case"only":case"first":while(c=c.previousSibling)if(c.nodeType===1)return!1;if(l==="first")return!0;c=e;case"last":while(c=c.nextSibling)if(c.nodeType===1)return!1;return!0;case"nth":n=t[2],i=t[3];if(n===1&&i===0)return!0;s=t[0],o=e.parentNode;if(o&&(o[r]!==s||!e.nodeIndex)){a=0;for(c=o.firstChild;c;c=c.nextSibling)c.nodeType===1&&(c.nodeIndex=++a);o[r]=s}return f=e.nodeIndex-i,n===0?f===0:f%n===0&&f/n>=0}},ID:function(e,t){return e.nodeType===1&&e.getAttribute("id")===t},TAG:function(e,t){return t==="*"&&e.nodeType===1||!!e.nodeName&&e.nodeName.toLowerCase()===t},CLASS:function(e,t){return(" "+(e.className||e.getAttribute("class"))+" ").indexOf(t)>-1},ATTR:function(e,t){var n=t[1],r=h.attr?h.attr(e,n):d.attrHandle[n]?d.attrHandle[n](e):e[n]!=null?e[n]:e.getAttribute(n),i=r+"",s=t[2],o=t[4];return r==null?s==="!=":!s&&h.attr?r!=null:s==="="?i===o:s==="*="?i.indexOf(o)>=0:s==="~="?(" "+i+" ").indexOf(o)>=0:o?s==="!="?i!==o:s==="^="?i.indexOf(o)===0:s==="$="?i.substr(i.length-o.length)===o:s==="|="?i===o||i.substr(0,o.length+1)===o+"-":!1:i&&r!==!1},POS:function(e,t,n,r){var i=t[2],s=d.setFilters[i];if(s)return s(e,n,t,r)}}},v=d.match.POS,m=function(e,t){return"\\"+(t-0+1)};for(var g in d.match)d.match[g]=new RegExp(d.match[g].source+/(?![^\[]*\])(?![^\(]*\))/.source),d.leftMatch[g]=new RegExp(/(^(?:.|\r|\n)*?)/.source+d.match[g].source.replace(/\\(\d+)/g,m));d.match.globalPOS=v;var y=function(e,t){return e=Array.prototype.slice.call(e,0),t?(t.push.apply(t,e),t):e};try{Array.prototype.slice.call(n.documentElement.childNodes,0)[0].nodeType}catch(b){y=function(e,t){var n=0,r=t||[];if(o.call(e)==="[object Array]")Array.prototype.push.apply(r,e);else if(typeof e.length=="number")for(var i=e.length;n<i;n++)r.push(e[n]);else for(;e[n];n++)r.push(e[n]);return r}}var w,E;n.documentElement.compareDocumentPosition?w=function(e,t){return e===t?(u=!0,0):!e.compareDocumentPosition||!t.compareDocumentPosition?e.compareDocumentPosition?-1:1:e.compareDocumentPosition(t)&4?-1:1}:(w=function(e,t){if(e===t)return u=!0,0;if(e.sourceIndex&&t.sourceIndex)return e.sourceIndex-t.sourceIndex;var n,r,i=[],s=[],o=e.parentNode,a=t.parentNode,f=o;if(o===a)return E(e,t);if(!o)return-1;if(!a)return 1;while(f)i.unshift(f),f=f.parentNode;f=a;while(f)s.unshift(f),f=f.parentNode;n=i.length,r=s.length;for(var l=0;l<n&&l<r;l++)if(i[l]!==s[l])return E(i[l],s[l]);return l===n?E(e,s[l],-1):E(i[l],t,1)},E=function(e,t,n){if(e===t)return n;var r=e.nextSibling;while(r){if(r===t)return-1;r=r.nextSibling}return 1}),function(){var e=n.createElement("div"),r="script"+(new Date).getTime(),i=n.documentElement;e.innerHTML="<a name='"+r+"'/>",i.insertBefore(e,i.firstChild),n.getElementById(r)&&(d.find.ID=function(e,n,r){if(typeof n.getElementById!="undefined"&&!r){var i=n.getElementById(e[1]);return i?i.id===e[1]||typeof i.getAttributeNode!="undefined"&&i.getAttributeNode("id").nodeValue===e[1]?[i]:t:[]}},d.filter.ID=function(e,t){var n=typeof e.getAttributeNode!="undefined"&&e.getAttributeNode("id");return e.nodeType===1&&n&&n.nodeValue===t}),i.removeChild(e),i=e=null}(),function(){var e=n.createElement("div");e.appendChild(n.createComment("")),e.getElementsByTagName("*").length>0&&(d.find.TAG=function(e,t){var n=t.getElementsByTagName(e[1]);if(e[1]==="*"){var r=[];for(var i=0;n[i];i++)n[i].nodeType===1&&r.push(n[i]);n=r}return n}),e.innerHTML="<a href='#'></a>",e.firstChild&&typeof e.firstChild.getAttribute!="undefined"&&e.firstChild.getAttribute("href")!=="#"&&(d.attrHandle.href=function(e){return e.getAttribute("href",2)}),e=null}(),n.querySelectorAll&&function(){var e=h,t=n.createElement("div"),r="__sizzle__";t.innerHTML="<p class='TEST'></p>";if(t.querySelectorAll&&t.querySelectorAll(".TEST").length===0)return;h=function(t,i,s,o){i=i||n;if(!o&&!h.isXML(i)){var u=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(t);if(u&&(i.nodeType===1||i.nodeType===9)){if(u[1])return y(i.getElementsByTagName(t),s);if(u[2]&&d.find.CLASS&&i.getElementsByClassName)return y(i.getElementsByClassName(u[2]),s)}if(i.nodeType===9){if(t==="body"&&i.body)return y([i.body],s);if(u&&u[3]){var a=i.getElementById(u[3]);if(!a||!a.parentNode)return y([],s);if(a.id===u[3])return y([a],s)}try{return y(i.querySelectorAll(t),s)}catch(f){}}else if(i.nodeType===1&&i.nodeName.toLowerCase()!=="object"){var l=i,c=i.getAttribute("id"),p=c||r,v=i.parentNode,m=/^\s*[+~]/.test(t);c?p=p.replace(/'/g,"\\$&"):i.setAttribute("id",p),m&&v&&(i=i.parentNode);try{if(!m||v)return y(i.querySelectorAll("[id='"+p+"'] "+t),s)}catch(g){}finally{c||l.removeAttribute("id")}}}return e(t,i,s,o)};for(var i in e)h[i]=e[i];t=null}(),function(){var e=n.documentElement,t=e.matchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.msMatchesSelector;if(t){var r=!t.call(n.createElement("div"),"div"),i=!1;try{t.call(n.documentElement,"[test!='']:sizzle")}catch(s){i=!0}h.matchesSelector=function(e,n){n=n.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!h.isXML(e))try{if(i||!d.match.PSEUDO.test(n)&&!/!=/.test(n)){var s=t.call(e,n);if(s||!r||e.document&&e.document.nodeType!==11)return s}}catch(o){}return h(n,null,null,[e]).length>0}}}(),function(){var e=n.createElement("div");e.innerHTML="<div class='test e'></div><div class='test'></div>";if(!e.getElementsByClassName||e.getElementsByClassName("e").length===0)return;e.lastChild.className="e";if(e.getElementsByClassName("e").length===1)return;d.order.splice(1,0,"CLASS"),d.find.CLASS=function(e,t,n){if(typeof t.getElementsByClassName!="undefined"&&!n)return t.getElementsByClassName(e[1])},e=null}(),n.documentElement.contains?h.contains=function(e,t){return e!==t&&(e.contains?e.contains(t):!0)}:n.documentElement.compareDocumentPosition?h.contains=function(e,t){return!!(e.compareDocumentPosition(t)&16)}:h.contains=function(){return!1},h.isXML=function(e){var t=(e?e.ownerDocument||e:0).documentElement;return t?t.nodeName!=="HTML":!1};var T=function(e,t,n){var r,i=[],s="",o=t.nodeType?[t]:t;while(r=d.match.PSEUDO.exec(e))s+=r[0],e=e.replace(d.match.PSEUDO,"");e=d.relative[e]?e+"*":e;for(var u=0,a=o.length;u<a;u++)h(e,o[u],i,n);return h.filter(s,i)};h.attr=s.attr,h.selectors.attrMap={},s.find=h,s.expr=h.selectors,s.expr[":"]=s.expr.filters,s.unique=h.uniqueSort,s.text=h.getText,s.isXMLDoc=h.isXML,s.contains=h.contains}();var j=/Until$/,F=/^(?:parents|prevUntil|prevAll)/,I=/,/,q=/^.[^:#\[\.,]*$/,R=Array.prototype.slice,U=s.expr.match.globalPOS,z={children:!0,contents:!0,next:!0,prev:!0};s.fn.extend({find:function(e){var t=this,n,r;if(typeof e!="string")return s(e).filter(function(){for(n=0,r=t.length;n<r;n++)if(s.contains(t[n],this))return!0});var i=this.pushStack("","find",e),o,u,a;for(n=0,r=this.length;n<r;n++){o=i.length,s.find(e,this[n],i);if(n>0)for(u=o;u<i.length;u++)for(a=0;a<o;a++)if(i[a]===i[u]){i.splice(u--,1);break}}return i},has:function(e){var t=s(e);return this.filter(function(){for(var e=0,n=t.length;e<n;e++)if(s.contains(this,t[e]))return!0})},not:function(e){return this.pushStack(X(this,e,!1),"not",e)},filter:function(e){return this.pushStack(X(this,e,!0),"filter",e)},is:function(e){return!!e&&(typeof e=="string"?U.test(e)?s(e,this.context).index(this[0])>=0:s.filter(e,this).length>0:this.filter(e).length>0)},closest:function(e,t){var n=[],r,i,o=this[0];if(s.isArray(e)){var u=1;while(o&&o.ownerDocument&&o!==t){for(r=0;r<e.length;r++)s(o).is(e[r])&&n.push({selector:e[r],elem:o,level:u});o=o.parentNode,u++}return n}var a=U.test(e)||typeof e!="string"?s(e,t||this.context):0;for(r=0,i=this.length;r<i;r++){o=this[r];while(o){if(a?a.index(o)>-1:s.find.matchesSelector(o,e)){n.push(o);break}o=o.parentNode;if(!o||!o.ownerDocument||o===t||o.nodeType===11)break}}return n=n.length>1?s.unique(n):n,this.pushStack(n,"closest",e)},index:function(e){return e?typeof e=="string"?s.inArray(this[0],s(e)):s.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.prevAll().length:-1},add:function(e,t){var n=typeof e=="string"?s(e,t):s.makeArray(e&&e.nodeType?[e]:e),r=s.merge(this.get(),n);return this.pushStack(W(n[0])||W(r[0])?r:s.unique(r))},andSelf:function(){return this.add(this.prevObject)}}),s.each({parent:function(e){var t=e.parentNode;return t&&t.nodeType!==11?t:null},parents:function(e){return s.dir(e,"parentNode")},parentsUntil:function(e,t,n){return s.dir(e,"parentNode",n)},next:function(e){return s.nth(e,2,"nextSibling")},prev:function(e){return s.nth(e,2,"previousSibling")},nextAll:function(e){return s.dir(e,"nextSibling")},prevAll:function(e){return s.dir(e,"previousSibling")},nextUntil:function(e,t,n){return s.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return s.dir(e,"previousSibling",n)},siblings:function(e){return s.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return s.sibling(e.firstChild)},contents:function(e){return s.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:s.makeArray(e.childNodes)}},function(e,t){s.fn[e]=function(n,r){var i=s.map(this,t,n);return j.test(e)||(r=n),r&&typeof r=="string"&&(i=s.filter(r,i)),i=this.length>1&&!z[e]?s.unique(i):i,(this.length>1||I.test(r))&&F.test(e)&&(i=i.reverse()),this.pushStack(i,e,R.call(arguments).join(","))}}),s.extend({filter:function(e,t,n){return n&&(e=":not("+e+")"),t.length===1?s.find.matchesSelector(t[0],e)?[t[0]]:[]:s.find.matches(e,t)},dir:function(e,n,r){var i=[],o=e[n];while(o&&o.nodeType!==9&&(r===t||o.nodeType!==1||!s(o).is(r)))o.nodeType===1&&i.push(o),o=o[n];return i},nth:function(e,t,n,r){t=t||1;var i=0;for(;e;e=e[n])if(e.nodeType===1&&++i===t)break;return e},sibling:function(e,t){var n=[];for(;e;e=e.nextSibling)e.nodeType===1&&e!==t&&n.push(e);return n}});var $="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",J=/ jQuery\d+="(?:\d+|null)"/g,K=/^\s+/,Q=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,G=/<([\w:]+)/,Y=/<tbody/i,Z=/<|&#?\w+;/,et=/<(?:script|style)/i,tt=/<(?:script|object|embed|option|style)/i,nt=new RegExp("<(?:"+$+")[\\s/>]","i"),rt=/checked\s*(?:[^=]|=\s*.checked.)/i,it=/\/(java|ecma)script/i,st=/^\s*<!(?:\[CDATA\[|\-\-)/,ot={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]},ut=V(n);ot.optgroup=ot.option,ot.tbody=ot.tfoot=ot.colgroup=ot.caption=ot.thead,ot.th=ot.td,s.support.htmlSerialize||(ot._default=[1,"div<div>","</div>"]),s.fn.extend({text:function(e){return s.access(this,function(e){return e===t?s.text(this):this.empty().append((this[0]&&this[0].ownerDocument||n).createTextNode(e))},null,e,arguments.length)},wrapAll:function(e){if(s.isFunction(e))return this.each(function(t){s(this).wrapAll(e.call(this,t))});if(this[0]){var t=s(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstChild&&e.firstChild.nodeType===1)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return s.isFunction(e)?this.each(function(t){s(this).wrapInner(e.call(this,t))}):this.each(function(){var t=s(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=s.isFunction(e);return this.each(function(n){s(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){s.nodeName(this,"body")||s(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(e){this.nodeType===1&&this.appendChild(e)})},prepend:function(){return this.domManip(arguments,!0,function(e){this.nodeType===1&&this.insertBefore(e,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(e){this.parentNode.insertBefore(e,this)});if(arguments.length){var e=s.clean(arguments);return e.push.apply(e,this.toArray()),this.pushStack(e,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(e){this.parentNode.insertBefore(e,this.nextSibling)});if(arguments.length){var e=this.pushStack(this,"after",arguments);return e.push.apply(e,s.clean(arguments)),e}},remove:function(e,t){for(var n=0,r;(r=this[n])!=null;n++)if(!e||s.filter(e,[r]).length)!t&&r.nodeType===1&&(s.cleanData(r.getElementsByTagName("*")),s.cleanData([r])),r.parentNode&&r.parentNode.removeChild(r);return this},empty:function(){for(var e=0,t;(t=this[e])!=null;e++){t.nodeType===1&&s.cleanData(t.getElementsByTagName("*"));while(t.firstChild)t.removeChild(t.firstChild)}return this},clone:function(e,t){return e=e==null?!1:e,t=t==null?e:t,this.map(function(){return s.clone(this,e,t)})},html:function(e){return s.access(this,function(e){var n=this[0]||{},r=0,i=this.length;if(e===t)return n.nodeType===1?n.innerHTML.replace(J,""):null;if(typeof e=="string"&&!et.test(e)&&(s.support.leadingWhitespace||!K.test(e))&&!ot[(G.exec(e)||["",""])[1].toLowerCase()]){e=e.replace(Q,"<$1></$2>");try{for(;r<i;r++)n=this[r]||{},n.nodeType===1&&(s.cleanData(n.getElementsByTagName("*")),n.innerHTML=e);n=0}catch(o){}}n&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(e){return this[0]&&this[0].parentNode?s.isFunction(e)?this.each(function(t){var n=s(this),r=n.html();n.replaceWith(e.call(this,t,r))}):(typeof e!="string"&&(e=s(e).detach()),this.each(function(){var t=this.nextSibling,n=this.parentNode;s(this).remove(),t?s(t).before(e):s(n).append(e)})):this.length?this.pushStack(s(s.isFunction(e)?e():e),"replaceWith",e):this},detach:function(e){return this.remove(e,!0)},domManip:function(e,n,r){var i,o,u,a,f=e[0],l=[];if(!s.support.checkClone&&arguments.length===3&&typeof f=="string"&&rt.test(f))return this.each(function(){s(this).domManip(e,n,r,!0)});if(s.isFunction(f))return this.each(function(i){var o=s(this);e[0]=f.call(this,i,n?o.html():t),o.domManip(e,n,r)});if(this[0]){a=f&&f.parentNode,s.support.parentNode&&a&&a.nodeType===11&&a.childNodes.length===this.length?i={fragment:a}:i=s.buildFragment(e,this,l),u=i.fragment,u.childNodes.length===1?o=u=u.firstChild:o=u.firstChild;if(o){n=n&&s.nodeName(o,"tr");for(var c=0,h=this.length,p=h-1;c<h;c++)r.call(n?at(this[c],o):this[c],i.cacheable||h>1&&c<p?s.clone(u,!0,!0):u)}l.length&&s.each(l,function(e,t){t.src?s.ajax({type:"GET",global:!1,url:t.src,async:!1,dataType:"script"}):s.globalEval((t.text||t.textContent||t.innerHTML||"").replace(st,"/*$0*/")),t.parentNode&&t.parentNode.removeChild(t)})}return this}}),s.buildFragment=function(e,t,r){var i,o,u,a,f=e[0];return t&&t[0]&&(a=t[0].ownerDocument||t[0]),a.createDocumentFragment||(a=n),e.length===1&&typeof f=="string"&&f.length<512&&a===n&&f.charAt(0)==="<"&&!tt.test(f)&&(s.support.checkClone||!rt.test(f))&&(s.support.html5Clone||!nt.test(f))&&(o=!0,u=s.fragments[f],u&&u!==1&&(i=u)),i||(i=a.createDocumentFragment(),s.clean(e,a,i,r)),o&&(s.fragments[f]=u?i:1),{fragment:i,cacheable:o}},s.fragments={},s.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){s.fn[e]=function(n){var r=[],i=s(n),o=this.length===1&&this[0].parentNode;if(o&&o.nodeType===11&&o.childNodes.length===1&&i.length===1)return i[t](this[0]),this;for(var u=0,a=i.length;u<a;u++){var f=(u>0?this.clone(!0):this).get();s(i[u])[t](f),r=r.concat(f)}return this.pushStack(r,e,i.selector)}}),s.extend({clone:function(e,t,n){var r,i,o,u=s.support.html5Clone||s.isXMLDoc(e)||!nt.test("<"+e.nodeName+">")?e.cloneNode(!0):dt(e);if((!s.support.noCloneEvent||!s.support.noCloneChecked)&&(e.nodeType===1||e.nodeType===11)&&!s.isXMLDoc(e)){lt(e,u),r=ct(e),i=ct(u);for(o=0;r[o];++o)i[o]&&lt(r[o],i[o])}if(t){ft(e,u);if(n){r=ct(e),i=ct(u);for(o=0;r[o];++o)ft(r[o],i[o])}}return r=i=null,u},clean:function(e,t,r,i){var o,u,a,f=[];t=t||n,typeof t.createElement=="undefined"&&(t=t.ownerDocument||t[0]&&t[0].ownerDocument||n);for(var l=0,c;(c=e[l])!=null;l++){typeof c=="number"&&(c+="");if(!c)continue;if(typeof c=="string")if(!Z.test(c))c=t.createTextNode(c);else{c=c.replace(Q,"<$1></$2>");var h=(G.exec(c)||["",""])[1].toLowerCase(),p=ot[h]||ot._default,d=p[0],v=t.createElement("div"),m=ut.childNodes,g;t===n?ut.appendChild(v):V(t).appendChild(v),v.innerHTML=p[1]+c+p[2];while(d--)v=v.lastChild;if(!s.support.tbody){var y=Y.test(c),b=h==="table"&&!y?v.firstChild&&v.firstChild.childNodes:p[1]==="<table>"&&!y?v.childNodes:[];for(a=b.length-1;a>=0;--a)s.nodeName(b[a],"tbody")&&!b[a].childNodes.length&&b[a].parentNode.removeChild(b[a])}!s.support.leadingWhitespace&&K.test(c)&&v.insertBefore(t.createTextNode(K.exec(c)[0]),v.firstChild),c=v.childNodes,v&&(v.parentNode.removeChild(v),m.length>0&&(g=m[m.length-1],g&&g.parentNode&&g.parentNode.removeChild(g)))}var w;if(!s.support.appendChecked)if(c[0]&&typeof (w=c.length)=="number")for(a=0;a<w;a++)pt(c[a]);else pt(c);c.nodeType?f.push(c):f=s.merge(f,c)}if(r){o=function(e){return!e.type||it.test(e.type)};for(l=0;f[l];l++){u=f[l];if(i&&s.nodeName(u,"script")&&(!u.type||it.test(u.type)))i.push(u.parentNode?u.parentNode.removeChild(u):u);else{if(u.nodeType===1){var E=s.grep(u.getElementsByTagName("script"),o);f.splice.apply(f,[l+1,0].concat(E))}r.appendChild(u)}}}return f},cleanData:function(e){var t,n,r=s.cache,i=s.event.special,o=s.support.deleteExpando;for(var u=0,a;(a=e[u])!=null;u++){if(a.nodeName&&s.noData[a.nodeName.toLowerCase()])continue;n=a[s.expando];if(n){t=r[n];if(t&&t.events){for(var f in t.events)i[f]?s.event.remove(a,f):s.removeEvent(a,f,t.handle);t.handle&&(t.handle.elem=null)}o?delete a[s.expando]:a.removeAttribute&&a.removeAttribute(s.expando),delete r[n]}}}});var vt=/alpha\([^)]*\)/i,mt=/opacity=([^)]*)/,gt=/([A-Z]|^ms)/g,yt=/^[\-+]?(?:\d*\.)?\d+$/i,bt=/^-?(?:\d*\.)?\d+(?!px)[^\d\s]+$/i,wt=/^([\-+])=([\-+.\de]+)/,Et=/^margin/,St={position:"absolute",visibility:"hidden",display:"block"},xt=["Top","Right","Bottom","Left"],Tt,Nt,Ct;s.fn.css=function(e,n){return s.access(this,function(e,n,r){return r!==t?s.style(e,n,r):s.css(e,n)},e,n,arguments.length>1)},s.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Tt(e,"opacity");return n===""?"1":n}return e.style.opacity}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":s.support.cssFloat?"cssFloat":"styleFloat"},style:function(e,n,r,i){if(!e||e.nodeType===3||e.nodeType===8||!e.style)return;var o,u,a=s.camelCase(n),f=e.style,l=s.cssHooks[a];n=s.cssProps[a]||a;if(r===t)return l&&"get"in l&&(o=l.get(e,!1,i))!==t?o:f[n];u=typeof r,u==="string"&&(o=wt.exec(r))&&(r=+(o[1]+1)*+o[2]+parseFloat(s.css(e,n)),u="number");if(r==null||u==="number"&&isNaN(r))return;u==="number"&&!s.cssNumber[a]&&(r+="px");if(!l||!("set"in l)||(r=l.set(e,r))!==t)try{f[n]=r}catch(c){}},css:function(e,n,r){var i,o;n=s.camelCase(n),o=s.cssHooks[n],n=s.cssProps[n]||n,n==="cssFloat"&&(n="float");if(o&&"get"in o&&(i=o.get(e,!0,r))!==t)return i;if(Tt)return Tt(e,n)},swap:function(e,t,n){var r={},i,s;for(s in t)r[s]=e.style[s],e.style[s]=t[s];i=n.call(e);for(s in t)e.style[s]=r[s];return i}}),s.curCSS=s.css,n.defaultView&&n.defaultView.getComputedStyle&&(Nt=function(e,t){var n,r,i,o,u=e.style;return t=t.replace(gt,"-$1").toLowerCase(),(r=e.ownerDocument.defaultView)&&(i=r.getComputedStyle(e,null))&&(n=i.getPropertyValue(t),n===""&&!s.contains(e.ownerDocument.documentElement,e)&&(n=s.style(e,t))),!s.support.pixelMargin&&i&&Et.test(t)&&bt.test(n)&&(o=u.width,u.width=n,n=i.width,u.width=o),n}),n.documentElement.currentStyle&&(Ct=function(e,t){var n,r,i,s=e.currentStyle&&e.currentStyle[t],o=e.style;return s==null&&o&&(i=o[t])&&(s=i),bt.test(s)&&(n=o.left,r=e.runtimeStyle&&e.runtimeStyle.left,r&&(e.runtimeStyle.left=e.currentStyle.left),o.left=t==="fontSize"?"1em":s,s=o.pixelLeft+"px",o.left=n,r&&(e.runtimeStyle.left=r)),s===""?"auto":s}),Tt=Nt||Ct,s.each(["height","width"],function(e,t){s.cssHooks[t]={get:function(e,n,r){if(n)return e.offsetWidth!==0?kt(e,t,r):s.swap(e,St,function(){return kt(e,t,r)})},set:function(e,t){return yt.test(t)?t+"px":t}}}),s.support.opacity||(s.cssHooks.opacity={get:function(e,t){return mt.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?parseFloat(RegExp.$1)/100+"":t?"1":""},set:function(e,t){var n=e.style,r=e.currentStyle,i=s.isNumeric(t)?"alpha(opacity="+t*100+")":"",o=r&&r.filter||n.filter||"";n.zoom=1;if(t>=1&&s.trim(o.replace(vt,""))===""){n.removeAttribute("filter");if(r&&!r.filter)return}n.filter=vt.test(o)?o.replace(vt,i):o+" "+i}}),s(function(){s.support.reliableMarginRight||(s.cssHooks.marginRight={get:function(e,t){return s.swap(e,{display:"inline-block"},function(){return t?Tt(e,"margin-right"):e.style.marginRight})}})}),s.expr&&s.expr.filters&&(s.expr.filters.hidden=function(e){var t=e.offsetWidth,n=e.offsetHeight;return t===0&&n===0||!s.support.reliableHiddenOffsets&&(e.style&&e.style.display||s.css(e,"display"))==="none"},s.expr.filters.visible=function(e){return!s.expr.filters.hidden(e)}),s.each({margin:"",padding:"",border:"Width"},function(e,t){s.cssHooks[e+t]={expand:function(n){var r,i=typeof n=="string"?n.split(" "):[n],s={};for(r=0;r<4;r++)s[e+xt[r]+t]=i[r]||i[r-2]||i[0];return s}}});var Lt=/%20/g,At=/\[\]$/,Ot=/\r?\n/g,Mt=/#.*$/,_t=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,Dt=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,Pt=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,Ht=/^(?:GET|HEAD)$/,Bt=/^\/\//,jt=/\?/,Ft=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,It=/^(?:select|textarea)/i,qt=/\s+/,Rt=/([?&])_=[^&]*/,Ut=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,zt=s.fn.load,Wt={},Xt={},Vt,$t,Jt=["*/"]+["*"];try{Vt=i.href}catch(Kt){Vt=n.createElement("a"),Vt.href="",Vt=Vt.href}$t=Ut.exec(Vt.toLowerCase())||[],s.fn.extend({load:function(e,n,r){if(typeof e!="string"&&zt)return zt.apply(this,arguments);if(!this.length)return this;var i=e.indexOf(" ");if(i>=0){var o=e.slice(i,e.length);e=e.slice(0,i)}var u="GET";n&&(s.isFunction(n)?(r=n,n=t):typeof n=="object"&&(n=s.param(n,s.ajaxSettings.traditional),u="POST"));var a=this;return s.ajax({url:e,type:u,dataType:"html",data:n,complete:function(e,t,n){n=e.responseText,e.isResolved()&&(e.done(function(e){n=e}),a.html(o?s("<div>").append(n.replace(Ft,"")).find(o):n)),r&&a.each(r,[n,t,e])}}),this},serialize:function(){return s.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?s.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||It.test(this.nodeName)||Dt.test(this.type))}).map(function(e,t){var n=s(this).val();return n==null?null:s.isArray(n)?s.map(n,function(e,n){return{name:t.name,value:e.replace(Ot,"\r\n")}}):{name:t.name,value:n.replace(Ot,"\r\n")}}).get()}}),s.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(e,t){s.fn[t]=function(e){return this.on(t,e)}}),s.each(["get","post"],function(e,n){s[n]=function(e,r,i,o){return s.isFunction(r)&&(o=o||i,i=r,r=t),s.ajax({type:n,url:e,data:r,success:i,dataType:o})}}),s.extend({getScript:function(e,n){return s.get(e,t,n,"script")},getJSON:function(e,t,n){return s.get(e,t,n,"json")},ajaxSetup:function(e,t){return t?Yt(e,s.ajaxSettings):(t=e,e=s.ajaxSettings),Yt(e,t),e},ajaxSettings:{url:Vt,isLocal:Pt.test($t[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded; charset=UTF-8",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":Jt},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":e.String,"text html":!0,"text json":s.parseJSON,"text xml":s.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:Qt(Wt),ajaxTransport:Qt(Xt),ajax:function(e,n){function S(e,n,c,h){if(y===2)return;y=2,m&&clearTimeout(m),v=t,p=h||"",E.readyState=e>0?4:0;var d,g,w,S=n,x=c?en(r,E,c):t,T,N;if(e>=200&&e<300||e===304){if(r.ifModified){if(T=E.getResponseHeader("Last-Modified"))s.lastModified[l]=T;if(N=E.getResponseHeader("Etag"))s.etag[l]=N}if(e===304)S="notmodified",d=!0;else try{g=tn(r,x),S="success",d=!0}catch(C){S="parsererror",w=C}}else{w=S;if(!S||e)S="error",e<0&&(e=0)}E.status=e,E.statusText=""+(n||S),d?u.resolveWith(i,[g,S,E]):u.rejectWith(i,[E,S,w]),E.statusCode(f),f=t,b&&o.trigger("ajax"+(d?"Success":"Error"),[E,r,d?g:w]),a.fireWith(i,[E,S]),b&&(o.trigger("ajaxComplete",[E,r]),--s.active||s.event.trigger("ajaxStop"))}typeof e=="object"&&(n=e,e=t),n=n||{};var r=s.ajaxSetup({},n),i=r.context||r,o=i!==r&&(i.nodeType||i instanceof s)?s(i):s.event,u=s.Deferred(),a=s.Callbacks("once memory"),f=r.statusCode||{},l,c={},h={},p,d,v,m,g,y=0,b,w,E={readyState:0,setRequestHeader:function(e,t){if(!y){var n=e.toLowerCase();e=h[n]=h[n]||e,c[e]=t}return this},getAllResponseHeaders:function(){return y===2?p:null},getResponseHeader:function(e){var n;if(y===2){if(!d){d={};while(n=_t.exec(p))d[n[1].toLowerCase()]=n[2]}n=d[e.toLowerCase()]}return n===t?null:n},overrideMimeType:function(e){return y||(r.mimeType=e),this},abort:function(e){return e=e||"abort",v&&v.abort(e),S(0,e),this}};u.promise(E),E.success=E.done,E.error=E.fail,E.complete=a.add,E.statusCode=function(e){if(e){var t;if(y<2)for(t in e)f[t]=[f[t],e[t]];else t=e[E.status],E.then(t,t)}return this},r.url=((e||r.url)+"").replace(Mt,"").replace(Bt,$t[1]+"//"),r.dataTypes=s.trim(r.dataType||"*").toLowerCase().split(qt),r.crossDomain==null&&(g=Ut.exec(r.url.toLowerCase()),r.crossDomain=!(!g||g[1]==$t[1]&&g[2]==$t[2]&&(g[3]||(g[1]==="http:"?80:443))==($t[3]||($t[1]==="http:"?80:443)))),r.data&&r.processData&&typeof r.data!="string"&&(r.data=s.param(r.data,r.traditional)),Gt(Wt,r,n,E);if(y===2)return!1;b=r.global,r.type=r.type.toUpperCase(),r.hasContent=!Ht.test(r.type),b&&s.active++===0&&s.event.trigger("ajaxStart");if(!r.hasContent){r.data&&(r.url+=(jt.test(r.url)?"&":"?")+r.data,delete r.data),l=r.url;if(r.cache===!1){var x=s.now(),T=r.url.replace(Rt,"$1_="+x);r.url=T+(T===r.url?(jt.test(r.url)?"&":"?")+"_="+x:"")}}(r.data&&r.hasContent&&r.contentType!==!1||n.contentType)&&E.setRequestHeader("Content-Type",r.contentType),r.ifModified&&(l=l||r.url,s.lastModified[l]&&E.setRequestHeader("If-Modified-Since",s.lastModified[l]),s.etag[l]&&E.setRequestHeader("If-None-Match",s.etag[l])),E.setRequestHeader("Accept",r.dataTypes[0]&&r.accepts[r.dataTypes[0]]?r.accepts[r.dataTypes[0]]+(r.dataTypes[0]!=="*"?", "+Jt+"; q=0.01":""):r.accepts["*"]);for(w in r.headers)E.setRequestHeader(w,r.headers[w]);if(!r.beforeSend||r.beforeSend.call(i,E,r)!==!1&&y!==2){for(w in{success:1,error:1,complete:1})E[w](r[w]);v=Gt(Xt,r,n,E);if(!v)S(-1,"No Transport");else{E.readyState=1,b&&o.trigger("ajaxSend",[E,r]),r.async&&r.timeout>0&&(m=setTimeout(function(){E.abort("timeout")},r.timeout));try{y=1,v.send(c,S)}catch(N){if(!(y<2))throw N;S(-1,N)}}return E}return E.abort(),!1},param:function(e,n){var r=[],i=function(e,t){t=s.isFunction(t)?t():t,r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};n===t&&(n=s.ajaxSettings.traditional);if(s.isArray(e)||e.jquery&&!s.isPlainObject(e))s.each(e,function(){i(this.name,this.value)});else for(var o in e)Zt(o,e[o],n,i);return r.join("&").replace(Lt,"+")}}),s.extend({active:0,lastModified:{},etag:{}});var nn=s.now(),rn=/(\=)\?(&|$)|\?\?/i;s.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return s.expando+"_"+nn++}}),s.ajaxPrefilter("json jsonp",function(t,n,r){var i=typeof t.data=="string"&&/^application\/x\-www\-form\-urlencoded/.test(t.contentType);if(t.dataTypes[0]==="jsonp"||t.jsonp!==!1&&(rn.test(t.url)||i&&rn.test(t.data))){var o,u=t.jsonpCallback=s.isFunction(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,a=e[u],f=t.url,l=t.data,c="$1"+u+"$2";return t.jsonp!==!1&&(f=f.replace(rn,c),t.url===f&&(i&&(l=l.replace(rn,c)),t.data===l&&(f+=(/\?/.test(f)?"&":"?")+t.jsonp+"="+u))),t.url=f,t.data=l,e[u]=function(e){o=[e]},r.always(function(){e[u]=a,o&&s.isFunction(a)&&e[u](o[0])}),t.converters["script json"]=function(){return o||s.error(u+" was not called"),o[0]},t.dataTypes[0]="json","script"}}),s.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(e){return s.globalEval(e),e}}}),s.ajaxPrefilter("script",function(e){e.cache===t&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),s.ajaxTransport("script",function(e){if(e.crossDomain){var r,i=n.head||n.getElementsByTagName("head")[0]||n.documentElement;return{send:function(s,o){r=n.createElement("script"),r.async="async",e.scriptCharset&&(r.charset=e.scriptCharset),r.src=e.url,r.onload=r.onreadystatechange=function(e,n){if(n||!r.readyState||/loaded|complete/.test(r.readyState))r.onload=r.onreadystatechange=null,i&&r.parentNode&&i.removeChild(r),r=t,n||o(200,"success")},i.insertBefore(r,i.firstChild)},abort:function(){r&&r.onload(0,1)}}}});var sn=e.ActiveXObject?function(){for(var e in un)un[e](0,1)}:!1,on=0,un;s.ajaxSettings.xhr=e.ActiveXObject?function(){return!this.isLocal&&an()||fn()}:an,function(e){s.extend(s.support,{ajax:!!e,cors:!!e&&"withCredentials"in e})}(s.ajaxSettings.xhr()),s.support.ajax&&s.ajaxTransport(function(n){if(!n.crossDomain||s.support.cors){var r;return{send:function(i,o){var u=n.xhr(),a,f;n.username?u.open(n.type,n.url,n.async,n.username,n.password):u.open(n.type,n.url,n.async);if(n.xhrFields)for(f in n.xhrFields)u[f]=n.xhrFields[f];n.mimeType&&u.overrideMimeType&&u.overrideMimeType(n.mimeType),!n.crossDomain&&!i["X-Requested-With"]&&(i["X-Requested-With"]="XMLHttpRequest");try{for(f in i)u.setRequestHeader(f,i[f])}catch(l){}u.send(n.hasContent&&n.data||null),r=function(e,i){var f,l,c,h,p;try{if(r&&(i||u.readyState===4)){r=t,a&&(u.onreadystatechange=s.noop,sn&&delete un[a]);if(i)u.readyState!==4&&u.abort();else{f=u.status,c=u.getAllResponseHeaders(),h={},p=u.responseXML,p&&p.documentElement&&(h.xml=p);try{h.text=u.responseText}catch(e){}try{l=u.statusText}catch(d){l=""}!f&&n.isLocal&&!n.crossDomain?f=h.text?200:404:f===1223&&(f=204)}}}catch(v){i||o(-1,v)}h&&o(f,l,h,c)},!n.async||u.readyState===4?r():(a=++on,sn&&(un||(un={},s(e).unload(sn)),un[a]=r),u.onreadystatechange=r)},abort:function(){r&&r(0,1)}}}});var ln={},cn,hn,pn=/^(?:toggle|show|hide)$/,dn=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,vn,mn=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],gn;s.fn.extend({show:function(e,t,n){var r,i;if(e||e===0)return this.animate(wn("show",3),e,t,n);for(var o=0,u=this.length;o<u;o++)r=this[o],r.style&&(i=r.style.display,!s._data(r,"olddisplay")&&i==="none"&&(i=r.style.display=""),(i===""&&s.css(r,"display")==="none"||!s.contains(r.ownerDocument.documentElement,r))&&s._data(r,"olddisplay",En(r.nodeName)));for(o=0;o<u;o++){r=this[o];if(r.style){i=r.style.display;if(i===""||i==="none")r.style.display=s._data(r,"olddisplay")||""}}return this},hide:function(e,t,n){if(e||e===0)return this.animate(wn("hide",3),e,t,n);var r,i,o=0,u=this.length;for(;o<u;o++)r=this[o],r.style&&(i=s.css(r,"display"),i!=="none"&&!s._data(r,"olddisplay")&&s._data(r,"olddisplay",i));for(o=0;o<u;o++)this[o].style&&(this[o].style.display="none");return this},_toggle:s.fn.toggle,toggle:function(e,t,n){var r=typeof e=="boolean";return s.isFunction(e)&&s.isFunction(t)?this._toggle.apply(this,arguments):e==null||r?this.each(function(){var t=r?e:s(this).is(":hidden");s(this)[t?"show":"hide"]()}):this.animate(wn("toggle",3),e,t,n),this},fadeTo:function(e,t,n,r){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){function o(){i.queue===!1&&s._mark(this);var t=s.extend({},i),n=this.nodeType===1,r=n&&s(this).is(":hidden"),o,u,a,f,l,c,h,p,d,v,m;t.animatedProperties={};for(a in e){o=s.camelCase(a),a!==o&&(e[o]=e[a],delete e[a]);if((l=s.cssHooks[o])&&"expand"in l){c=l.expand(e[o]),delete e[o];for(a in c)a in e||(e[a]=c[a])}}for(o in e){u=e[o],s.isArray(u)?(t.animatedProperties[o]=u[1],u=e[o]=u[0]):t.animatedProperties[o]=t.specialEasing&&t.specialEasing[o]||t.easing||"swing";if(u==="hide"&&r||u==="show"&&!r)return t.complete.call(this);n&&(o==="height"||o==="width")&&(t.overflow=[this.style.overflow,this.style.overflowX,this.style.overflowY],s.css(this,"display")==="inline"&&s.css(this,"float")==="none"&&(!s.support.inlineBlockNeedsLayout||En(this.nodeName)==="inline"?this.style.display="inline-block":this.style.zoom=1))}t.overflow!=null&&(this.style.overflow="hidden");for(a in e)f=new s.fx(this,t,a),u=e[a],pn.test(u)?(m=s._data(this,"toggle"+a)||(u==="toggle"?r?"show":"hide":0),m?(s._data(this,"toggle"+a,m==="show"?"hide":"show"),f[m]()):f[u]()):(h=dn.exec(u),p=f.cur(),h?(d=parseFloat(h[2]),v=h[3]||(s.cssNumber[a]?"":"px"),v!=="px"&&(s.style(this,a,(d||1)+v),p=(d||1)/f.cur()*p,s.style(this,a,p+v)),h[1]&&(d=(h[1]==="-="?-1:1)*d+p),f.custom(p,d,v)):f.custom(p,u,""));return!0}var i=s.speed(t,n,r);return s.isEmptyObject(e)?this.each(i.complete,[!1]):(e=s.extend({},e),i.queue===!1?this.each(o):this.queue(i.queue,o))},stop:function(e,n,r){return typeof e!="string"&&(r=n,n=e,e=t),n&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){function u(e,t,n){var i=t[n];s.removeData(e,n,!0),i.stop(r)}var t,n=!1,i=s.timers,o=s._data(this);r||s._unmark(!0,this);if(e==null)for(t in o)o[t]&&o[t].stop&&t.indexOf(".run")===t.length-4&&u(this,o,t);else o[t=e+".run"]&&o[t].stop&&u(this,o,t);for(t=i.length;t--;)i[t].elem===this&&(e==null||i[t].queue===e)&&(r?i[t](!0):i[t].saveState(),n=!0,i.splice(t,1));(!r||!n)&&s.dequeue(this,e)})}}),s.each({slideDown:wn("show",1),slideUp:wn("hide",1),slideToggle:wn("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){s.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),s.extend({speed:function(e,t,n){var r=e&&typeof e=="object"?s.extend({},e):{complete:n||!n&&t||s.isFunction(e)&&e,duration:e,easing:n&&t||t&&!s.isFunction(t)&&t};r.duration=s.fx.off?0:typeof r.duration=="number"?r.duration:r.duration in s.fx.speeds?s.fx.speeds[r.duration]:s.fx.speeds._default;if(r.queue==null||r.queue===!0)r.queue="fx";return r.old=r.complete,r.complete=function(e){s.isFunction(r.old)&&r.old.call(this),r.queue?s.dequeue(this,r.queue):e!==!1&&s._unmark(this)},r},easing:{linear:function(e){return e},swing:function(e){return-Math.cos(e*Math.PI)/2+.5}},timers:[],fx:function(e,t,n){this.options=t,this.elem=e,this.prop=n,t.orig=t.orig||{}}}),s.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this),(s.fx.step[this.prop]||s.fx.step._default)(this)},cur:function(){if(this.elem[this.prop]==null||!!this.elem.style&&this.elem.style[this.prop]!=null){var e,t=s.css(this.elem,this.prop);return isNaN(e=parseFloat(t))?!t||t==="auto"?0:t:e}return this.elem[this.prop]},custom:function(e,n,r){function u(e){return i.step(e)}var i=this,o=s.fx;this.startTime=gn||yn(),this.end=n,this.now=this.start=e,this.pos=this.state=0,this.unit=r||this.unit||(s.cssNumber[this.prop]?"":"px"),u.queue=this.options.queue,u.elem=this.elem,u.saveState=function(){s._data(i.elem,"fxshow"+i.prop)===t&&(i.options.hide?s._data(i.elem,"fxshow"+i.prop,i.start):i.options.show&&s._data(i.elem,"fxshow"+i.prop,i.end))},u()&&s.timers.push(u)&&!vn&&(vn=setInterval(o.tick,o.interval))},show:function(){var e=s._data(this.elem,"fxshow"+this.prop);this.options.orig[this.prop]=e||s.style(this.elem,this.prop),this.options.show=!0,e!==t?this.custom(this.cur(),e):this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur()),s(this.elem).show()},hide:function(){this.options.orig[this.prop]=s._data(this.elem,"fxshow"+this.prop)||s.style(this.elem,this.prop),this.options.hide=!0,this.custom(this.cur(),0)},step:function(e){var t,n,r,i=gn||yn(),o=!0,u=this.elem,a=this.options;if(e||i>=a.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),a.animatedProperties[this.prop]=!0;for(t in a.animatedProperties)a.animatedProperties[t]!==!0&&(o=!1);if(o){a.overflow!=null&&!s.support.shrinkWrapBlocks&&s.each(["","X","Y"],function(e,t){u.style["overflow"+t]=a.overflow[e]}),a.hide&&s(u).hide();if(a.hide||a.show)for(t in a.animatedProperties)s.style(u,t,a.orig[t]),s.removeData(u,"fxshow"+t,!0),s.removeData(u,"toggle"+t,!0);r=a.complete,r&&(a.complete=!1,r.call(u))}return!1}return a.duration==Infinity?this.now=i:(n=i-this.startTime,this.state=n/a.duration,this.pos=s.easing[a.animatedProperties[this.prop]](this.state,n,0,1,a.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update(),!0}},s.extend(s.fx,{tick:function(){var e,t=s.timers,n=0;for(;n<t.length;n++)e=t[n],!e()&&t[n]===e&&t.splice(n--,1);t.length||s.fx.stop()},interval:13,stop:function(){clearInterval(vn),vn=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(e){s.style(e.elem,"opacity",e.now)},_default:function(e){e.elem.style&&e.elem.style[e.prop]!=null?e.elem.style[e.prop]=e.now+e.unit:e.elem[e.prop]=e.now}}}),s.each(mn.concat.apply([],mn),function(e,t){t.indexOf("margin")&&(s.fx.step[t]=function(e){s.style(e.elem,t,Math.max(0,e.now)+e.unit)})}),s.expr&&s.expr.filters&&(s.expr.filters.animated=function(e){return s.grep(s.timers,function(t){return e===t.elem}).length});var Sn,xn=/^t(?:able|d|h)$/i,Tn=/^(?:body|html)$/i;"getBoundingClientRect"in n.documentElement?Sn=function(e,t,n,r){try{r=e.getBoundingClientRect()}catch(i){}if(!r||!s.contains(n,e))return r?{top:r.top,left:r.left}:{top:0,left:0};var o=t.body,u=Nn(t),a=n.clientTop||o.clientTop||0,f=n.clientLeft||o.clientLeft||0,l=u.pageYOffset||s.support.boxModel&&n.scrollTop||o.scrollTop,c=u.pageXOffset||s.support.boxModel&&n.scrollLeft||o.scrollLeft,h=r.top+l-a,p=r.left+c-f;return{top:h,left:p}}:Sn=function(e,t,n){var r,i=e.offsetParent,o=e,u=t.body,a=t.defaultView,f=a?a.getComputedStyle(e,null):e.currentStyle,l=e.offsetTop,c=e.offsetLeft;while((e=e.parentNode)&&e!==u&&e!==n){if(s.support.fixedPosition&&f.position==="fixed")break;r=a?a.getComputedStyle(e,null):e.currentStyle,l-=e.scrollTop,c-=e.scrollLeft,e===i&&(l+=e.offsetTop,c+=e.offsetLeft,s.support.doesNotAddBorder&&(!s.support.doesAddBorderForTableAndCells||!xn.test(e.nodeName))&&(l+=parseFloat(r.borderTopWidth)||0,c+=parseFloat(r.borderLeftWidth)||0),o=i,i=e.offsetParent),s.support.subtractsBorderForOverflowNotVisible&&r.overflow!=="visible"&&(l+=parseFloat(r.borderTopWidth)||0,c+=parseFloat(r.borderLeftWidth)||0),f=r}if(f.position==="relative"||f.position==="static")l+=u.offsetTop,c+=u.offsetLeft;return s.support.fixedPosition&&f.position==="fixed"&&(l+=Math.max(n.scrollTop,u.scrollTop),c+=Math.max(n.scrollLeft,u.scrollLeft)),{top:l,left:c}},s.fn.offset=function(e){if(arguments.length)return e===t?this:this.each(function(t){s.offset.setOffset(this,e,t)});var n=this[0],r=n&&n.ownerDocument;return r?n===r.body?s.offset.bodyOffset(n):Sn(n,r,r.documentElement):null},s.offset={bodyOffset:function(e){var t=e.offsetTop,n=e.offsetLeft;return s.support.doesNotIncludeMarginInBodyOffset&&(t+=parseFloat(s.css(e,"marginTop"))||0,n+=parseFloat(s.css(e,"marginLeft"))||0),{top:t,left:n}},setOffset:function(e,t,n){var r=s.css(e,"position");r==="static"&&(e.style.position="relative");var i=s(e),o=i.offset(),u=s.css(e,"top"),a=s.css(e,"left"),f=(r==="absolute"||r==="fixed")&&s.inArray("auto",[u,a])>-1,l={},c={},h,p;f?(c=i.position(),h=c.top,p=c.left):(h=parseFloat(u)||0,p=parseFloat(a)||0),s.isFunction(t)&&(t=t.call(e,n,o)),t.top!=null&&(l.top=t.top-o.top+h),t.left!=null&&(l.left=t.left-o.left+p),"using"in t?t.using.call(e,l):i.css(l)}},s.fn.extend({position:function(){if(!this[0])return null;var e=this[0],t=this.offsetParent(),n=this.offset(),r=Tn.test(t[0].nodeName)?{top:0,left:0}:t.offset();return n.top-=parseFloat(s.css(e,"marginTop"))||0,n.left-=parseFloat(s.css(e,"marginLeft"))||0,r.top+=parseFloat(s.css(t[0],"borderTopWidth"))||0,r.left+=parseFloat(s.css(t[0],"borderLeftWidth"))||0,{top:n.top-r.top,left:n.left-r.left}},offsetParent:function(){return this.map(function(){var e=this.offsetParent||n.body;while(e&&!Tn.test(e.nodeName)&&s.css(e,"position")==="static")e=e.offsetParent;return e})}}),s.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,n){var r=/Y/.test(n);s.fn[e]=function(i){return s.access(this,function(e,i,o){var u=Nn(e);if(o===t)return u?n in u?u[n]:s.support.boxModel&&u.document.documentElement[i]||u.document.body[i]:e[i];u?u.scrollTo(r?s(u).scrollLeft():o,r?o:s(u).scrollTop()):e[i]=o},e,i,arguments.length,null)}}),s.each({Height:"height",Width:"width"},function(e,n){var r="client"+e,i="scroll"+e,o="offset"+e;s.fn["inner"+e]=function(){var e=this[0];return e?e.style?parseFloat(s.css(e,n,"padding")):this[n]():null},s.fn["outer"+e]=function(e){var t=this[0];return t?t.style?parseFloat(s.css(t,n,e?"margin":"border")):this[n]():null},s.fn[n]=function(e){return s.access(this,function(e,n,u){var a,f,l,c;if(s.isWindow(e))return a=e.document,f=a.documentElement[r],s.support.boxModel&&f||a.body&&a.body[r]||f;if(e.nodeType===9)return a=e.documentElement,a[r]>=a[i]?a[r]:Math.max(e.body[i],a[i],e.body[o],a[o]);if(u===t)return l=s.css(e,n),c=parseFloat(l),s.isNumeric(c)?c:l;s(e).css(n,u)},n,e,arguments.length,null)}}),e.jQuery=e.$=s,typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return s})})(window),function(e,t){(function(n){typeof define=="function"&&define.amd?define("Sammy",["jquery"],n):e.sammy=t.Sammy=n(e)})(function(e){var n,r="([^/]+)",i=/:([\w\d]+)/g,s=/\?([^#]*)?$/,o=function(e){return Array.prototype.slice.call(e)},u=function(e){return Object.prototype.toString.call(e)==="[object Function]"},a=function(e){return Object.prototype.toString.call(e)==="[object Array]"},f=function(e){return Object.prototype.toString.call(e)==="[object RegExp]"},l=function(e){return decodeURIComponent((e||"").replace(/\+/g," "))},c=encodeURIComponent,h=function(e){return String(e).replace(/&(?!\w+;)/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")},p=function(e){return function(t,n){return this.route.apply(this,[e,t,n])}},d={},v=!!t.history&&!!history.pushState,m=[];return n=function(){var t=o(arguments),r,i;n.apps=n.apps||{};if(t.length===0||t[0]&&u(t[0]))return n.apply(n,["body"].concat(t));if(typeof (i=t.shift())=="string")return r=n.apps[i]||new n.Application,r.element_selector=i,t.length>0&&e.each(t,function(e,t){r.use(t)}),r.element_selector!=i&&delete n.apps[i],n.apps[r.element_selector]=r,r},n.VERSION="0.7.1",n.addLogger=function(e){m.push(e)},n.log=function(){var t=o(arguments);t.unshift("["+Date()+"]"),e.each(m,function(e,r){r.apply(n,t)})},typeof t.console!="undefined"?u(t.console.log.apply)?n.addLogger(function(){t.console.log.apply(t.console,arguments)}):n.addLogger(function(){t.console.log(arguments)}):typeof console!="undefined"&&n.addLogger(function(){console.log.apply(console,arguments)}),e.extend(n,{makeArray:o,isFunction:u,isArray:a}),n.Object=function(t){return e.extend(this,t||{})},e.extend(n.Object.prototype,{escapeHTML:h,h:h,toHash:function(){var t={};return e.each(this,function(e,n){u(n)||(t[e]=n)}),t},toHTML:function(){var t="";return e.each(this,function(e,n){u(n)||(t+="<strong>"+e+"</strong> "+n+"<br />")}),t},keys:function(e){var t=[];for(var n in this)(!u(this[n])||!e)&&t.push(n);return t},has:function(t){return this[t]&&e.trim(this[t].toString())!==""},join:function(){var e=o(arguments),t=e.shift();return e.join(t)},log:function(){n.log.apply(n,arguments)},toString:function(t){var n=[];return e.each(this,function(e,r){(!u(r)||t)&&n.push('"'+e+'": '+r.toString())}),"Sammy.Object: {"+n.join(",")+"}"}}),n.DefaultLocationProxy=function(e,t){this.app=e,this.is_native=!1,this.has_history=v,this._startPolling(t)},n.DefaultLocationProxy.fullPath=function(e){var t=e.toString().match(/^[^#]*(#.+)$/),n=t?t[1]:"";return[e.pathname,e.search,n].join("")},e.extend(n.DefaultLocationProxy.prototype,{bind:function(){var r=this,i=this.app,s=n.DefaultLocationProxy;e(t).bind("hashchange."+this.app.eventNamespace(),function(e,n){r.is_native===!1&&!n&&(r.is_native=!0,t.clearInterval(s._interval)),i.trigger("location-changed")}),v&&!i.disable_push_state&&(e(t).bind("popstate."+this.app.eventNamespace(),function(e){i.trigger("location-changed")}),e("a").live("click.history-"+this.app.eventNamespace(),function(e){if(e.isDefaultPrevented()||e.metaKey||e.ctrlKey)return;var n=s.fullPath(this);if(this.hostname==t.location.hostname&&i.lookupRoute("get",n)&&this.target!=="_blank")return e.preventDefault(),r.setLocation(n),!1})),s._bindings||(s._bindings=0),s._bindings++},unbind:function(){e(t).unbind("hashchange."+this.app.eventNamespace()),e(t).unbind("popstate."+this.app.eventNamespace()),e("a").die("click.history-"+this.app.eventNamespace()),n.DefaultLocationProxy._bindings--,n.DefaultLocationProxy._bindings<=0&&t.clearInterval(n.DefaultLocationProxy._interval)},getLocation:function(){return n.DefaultLocationProxy.fullPath(t.location)},setLocation:function(e){/^([^#\/]|$)/.test(e)&&(v&&!this.app.disable_push_state?e="/"+e:e="#!/"+e);if(e!=this.getLocation()){if(!(v&&!this.app.disable_push_state&&/^\//.test(e)))return t.location=e;history.pushState({path:e},t.title,e),this.app.trigger("location-changed")}},_startPolling:function(r){var i=this;if(!n.DefaultLocationProxy._interval){r||(r=10);var s=function(){var r=i.getLocation();(typeof n.DefaultLocationProxy._last_location=="undefined"||r!=n.DefaultLocationProxy._last_location)&&t.setTimeout(function(){e(t).trigger("hashchange",[!0])},0),n.DefaultLocationProxy._last_location=r};s(),n.DefaultLocationProxy._interval=t.setInterval(s,r)}}}),n.Application=function(e){var t=this;this.routes={},this.listeners=new n.Object({}),this.arounds=[],this.befores=[],this.namespace=(new Date).getTime()+"-"+parseInt(Math.random()*1e3,10),this.context_prototype=function(){n.EventContext.apply(this,arguments)},this.context_prototype.prototype=new n.EventContext,u(e)&&e.apply(this,[this]),this._location_proxy||this.setLocationProxy(new n.DefaultLocationProxy(this,this.run_interval_every)),this.debug&&this.bindToAllEvents(function(e,n){t.log(t.toString(),e.cleaned_type,n||{})})},n.Application.prototype=e.extend({},n.Object.prototype,{ROUTE_VERBS:["get","post","put","delete"],APP_EVENTS:["run","unload","lookup-route","run-route","route-found","event-context-before","event-context-after","changed","error","check-form-submission","redirect","location-changed"],_last_route:null,_location_proxy:null,_running:!1,element_selector:"body",debug:!1,raise_errors:!1,run_interval_every:50,disable_push_state:!1,template_engine:null,toString:function(){return"Sammy.Application:"+this.element_selector},$element:function(t){return t?e(this.element_selector).find(t):e(this.element_selector)},use:function(){var e=o(arguments),t=e.shift(),r=t||"";try{e.unshift(this),typeof t=="string"&&(r="Sammy."+t,t=n[t]),t.apply(this,e)}catch(i){typeof t=="undefined"?this.error("Plugin Error: called use() but plugin ("+r.toString()+") is not defined",i):u(t)?this.error("Plugin Error",i):this.error("Plugin Error: called use() but '"+r.toString()+"' is not a function",i)}return this},setLocationProxy:function(e){var t=this._location_proxy;this._location_proxy=e,this.isRunning()&&(t&&t.unbind(),this._location_proxy.bind())},log:function(){n.log.apply(n,Array.prototype.concat.apply([this.element_selector],arguments))},route:function(t,n,s){var o=this,a=[],f,l;!s&&u(n)&&(n=t,s=n,t="any"),t=t.toLowerCase();if(n.constructor==String){i.lastIndex=0;while((l=i.exec(n))!==null)a.push(l[1]);n=new RegExp(n.replace(i,r)+"$")}return typeof s=="string"&&(s=o[s]),f=function(e){var t={verb:e,path:n,callback:s,param_names:a};o.routes[e]=o.routes[e]||[],o.routes[e].push(t)},t==="any"?e.each(this.ROUTE_VERBS,function(e,t){f(t)}):f(t),this},get:p("get"),post:p("post"),put:p("put"),del:p("delete"),any:p("any"),mapRoutes:function(t){var n=this;return e.each(t,function(e,t){n.route.apply(n,t)}),this},eventNamespace:function(){return["sammy-app",this.namespace].join("-")},bind:function(e,t,n){var r=this;typeof n=="undefined"&&(n=t);var i=function(){var e,t,i;e=arguments[0],i=arguments[1],i&&i.context?(t=i.context,delete i.context):t=new r.context_prototype(r,"bind",e.type,i,e.target),e.cleaned_type=e.type.replace(r.eventNamespace(),""),n.apply(t,[e,i])};return this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(i),this.isRunning()&&this._listen(e,i),this},trigger:function(e,t){return this.$element().trigger([e,this.eventNamespace()].join("."),[t]),this},refresh:function(){return this.last_location=null,this.trigger("location-changed"),this},before:function(e,t){return u(e)&&(t=e,e={}),this.befores.push([e,t]),this},after:function(e){return this.bind("event-context-after",e)},around:function(e){return this.arounds.push(e),this},isRunning:function(){return this._running},helpers:function(t){return e.extend(this.context_prototype.prototype,t),this},helper:function(e,t){return this.context_prototype.prototype[e]=t,this},run:function(n){if(this.isRunning())return!1;var r=this;return e.each(this.listeners.toHash(),function(t,n){e.each(n,function(e,n){r._listen(t,n)})}),this.trigger("run",{start_url:n}),this._running=!0,this.last_location=null,!/\#(.+)/.test(this.getLocation())&&typeof n!="undefined"&&this.setLocation(n),this._checkLocation(),this._location_proxy.bind(),this.bind("location-changed",function(){r._checkLocation()}),this.bind("submit",function(t){var n=r._checkFormSubmission(e(t.target).closest("form"));return n===!1?t.preventDefault():!1}),e(t).bind("unload",function(){r.unload()}),this.trigger("changed")},unload:function(){if(!this.isRunning())return!1;var t=this;return this.trigger("unload"),this._location_proxy.unbind(),this.$element().unbind("submit").removeClass(t.eventNamespace()),e.each(this.listeners.toHash(),function(n,r){e.each(r,function(e,r){t._unlisten(n,r)})}),this._running=!1,this},bindToAllEvents:function(t){var n=this;return e.each(this.APP_EVENTS,function(e,r){n.bind(r,t)}),e.each(this.listeners.keys(!0),function(r,i){e.inArray(i,n.APP_EVENTS)==-1&&n.bind(i,t)}),this},routablePath:function(e){return e.replace(s,"")},lookupRoute:function(e,t){var n=this,r=!1,i=0,s,o;if(typeof this.routes[e]!="undefined"){s=this.routes[e].length;for(;i<s;i++){o=this.routes[e][i];if(n.routablePath(t).match(o.path)){r=o;break}}}return r},runRoute:function(t,n,r,i){var s=this,o=this.lookupRoute(t,n),u,a,f,c,h,p,d,v,m;this.log("runRoute",[t,n].join(" ")),this.trigger("run-route",{verb:t,path:n,params:r}),typeof r=="undefined"&&(r={}),e.extend(r,this._parseQueryString(n));if(o){this.trigger("route-found",{route:o}),(v=o.path.exec(this.routablePath(n)))!==null&&(v.shift(),e.each(v,function(e,t){o.param_names[e]?r[o.param_names[e]]=l(t):(r.splat||(r.splat=[]),r.splat.push(l(t)))})),u=new this.context_prototype(this,t,n,r,i),f=this.arounds.slice(0),h=this.befores.slice(0),d=[u].concat(r.splat),a=function(){var e;while(h.length>0){p=h.shift();if(s.contextMatchesOptions(u,p[0])){e=p[1].apply(u,[u]);if(e===!1)return!1}}return s.last_route=o,u.trigger("event-context-before",{context:u}),e=o.callback.apply(u,d),u.trigger("event-context-after",{context:u}),e},e.each(f.reverse(),function(e,t){var n=a;a=function(){return t.apply(u,[n])}});try{m=a()}catch(g){this.error(["500 Error",t,n].join(" "),g)}return m}return this.notFound(t,n)},contextMatchesOptions:function(t,n,r){var i=n;if(typeof i=="string"||f(i))i={path:i};typeof r=="undefined"&&(r=!0);if(e.isEmptyObject(i))return!0;if(a(i.path)){var s,o,u;s=[];for(o in i.path)u=e.extend({},i,{path:i.path[o]}),s.push(this.contextMatchesOptions(t,u));var l=e.inArray(!0,s)>-1?!0:!1;return r?l:!l}if(i.only)return this.contextMatchesOptions(t,i.only,!0);if(i.except)return this.contextMatchesOptions(t,i.except,!1);var c=!0,h=!0;return i.path&&(f(i.path)||(i.path=new RegExp(i.path.toString()+"$")),c=i.path.test(t.path)),i.verb&&(typeof i.verb=="string"?h=i.verb===t.verb:h=i.verb.indexOf(t.verb)>-1),r?h&&c:!h||!c},getLocation:function(){return this._location_proxy.getLocation()},setLocation:function(e){return this._location_proxy.setLocation(e)},swap:function(e,t){var n=this.$element().html(e);return u(t)&&t(e),n},templateCache:function(e,t){return typeof t!="undefined"?d[e]=t:d[e]},clearTemplateCache:function(){return d={}},notFound:function(e,t){var n=this.error(["404 Not Found",e,t].join(" "));return e==="get"?n:!0},error:function(e,t){t||(t=new Error),t.message=[e,t.message].join(" "),this.trigger("error",{message:t.message,error:t});if(this.raise_errors)throw t;this.log(t.message,t)},_checkLocation:function(){var e,t;e=this.getLocation();if(!this.last_location||this.last_location[0]!="get"||this.last_location[1]!=e)this.last_location=["get",e],t=this.runRoute("get",e);return t},_getFormVerb:function(t){var n=e(t),r,i;i=n.find('input[name="_method"]'),i.length>0&&(r=i.val()),r||(r=n[0].getAttribute("method"));if(!r||r=="")r="get";return e.trim(r.toString().toLowerCase())},_checkFormSubmission:function(t){var n,r,i,s,o;return this.trigger("check-form-submission",{form:t}),n=e(t),r=n.attr("action")||"",i=this._getFormVerb(n),this.log("_checkFormSubmission",n,r,i),i==="get"?(s=this._serializeFormParams(n),s!==""&&(r+="?"+s),this.setLocation(r),o=!1):(s=e.extend({},this._parseFormParams(n)),o=this.runRoute(i,r,s,t.get(0))),typeof o=="undefined"?!1:o},_serializeFormParams:function(e){var t="",n=e.serializeArray(),r;if(n.length>0){t=this._encodeFormPair(n[0].name,n[0].value);for(r=1;r<n.length;r++)t=t+"&"+this._encodeFormPair(n[r].name,n[r].value)}return t},_encodeFormPair:function(e,t){return c(e)+"="+c(t)},_parseFormParams:function(e){var t={},n=e.serializeArray(),r;for(r=0;r<n.length;r++)t=this._parseParamPair(t,n[r].name,n[r].value);return t},_parseQueryString:function(e){var t={},n,r,i,o;n=e.match(s);if(n&&n[1]){r=n[1].split("&");for(o=0;o<r.length;o++)i=r[o].split("="),t=this._parseParamPair(t,l(i[0]),l(i[1]||""))}return t},_parseParamPair:function(e,t,n){return typeof e[t]!="undefined"?a(e[t])?e[t].push(n):e[t]=[e[t],n]:e[t]=n,e},_listen:function(e,t){return this.$element().bind([e,this.eventNamespace()].join("."),t)},_unlisten:function(e,t){return this.$element().unbind([e,this.eventNamespace()].join("."),t)}}),n.RenderContext=function(e){this.event_context=e,this.callbacks=[],this.previous_content=null,this.content=null,this.next_engine=!1,this.waiting=!1},n.RenderContext.prototype=e.extend({},n.Object.prototype,{then:function(e){if(!u(e)){if(!(typeof e=="string"&&e in this.event_context))return this;var n=this.event_context[e];e=function(e){return n.apply(this.event_context,[e])}}var r=this;return this.waiting?this.callbacks.push(e):(this.wait(),t.setTimeout(function(){var t=e.apply(r,[r.content,r.previous_content]);t!==!1&&r.next(t)},0)),this},wait:function(){this.waiting=!0},next:function(e){this.waiting=!1,typeof e!="undefined"&&(this.previous_content=this.content,this.content=e),this.callbacks.length>0&&this.then(this.callbacks.shift())},load:function(t,n,r){var i=this;return this.then(function(){var s,o,a,f;u(n)?(r=n,n={}):n=e.extend({},n),r&&this.then(r);if(typeof t=="string")return a=t.match(/\.json$/)||n.json,s=a?n.cache===!0:n.cache!==!1,i.next_engine=i.event_context.engineFor(t),delete n.cache,delete n.json,n.engine&&(i.next_engine=n.engine,delete n.engine),s&&(o=this.event_context.app.templateCache(t))?o:(this.wait(),e.ajax(e.extend({url:t,data:{},dataType:a?"json":"text",type:"get",success:function(e){s&&i.event_context.app.templateCache(t,e),i.next(e)}},n)),!1);if(t.nodeType)return t.innerHTML;if(t.selector)return i.next_engine=t.attr("data-engine"),n.clone===!1?t.remove()[0].innerHTML.toString():t[0].innerHTML.toString()})},loadPartials:function(e){var t;if(e){this.partials=this.partials||{};for(t in e)(function(t,n){t.load(e[n]).then(function(e){this.partials[n]=e})})(this,t)}return this},render:function(e,t,n,r){return u(e)&&!t?this.then(e):(u(t)?(r=n,n=t,t=null):n&&!u(n)&&(r=n,n=null),this.loadPartials(r).load(e).interpolate(t,e).then(n))},partial:function(e,t,n,r){return u(n)?this.render(e,t,r).swap(n):u(t)?this.render(e,{},n).swap(t):this.render(e,t,n).swap()},send:function(){var e=this,t=o(arguments),n=t.shift();return a(t[0])&&(t=t[0]),this.then(function(r){return t.push(function(t){e.next(t)}),e.wait(),n.apply(n,t),!1})},collect:function(t,n,r){var i=this,s=function(){u(t)&&(n=t,t=this.content);var r=[],s=!1;return e.each(t,function(e,t){var o=n.apply(i,[e,t]);return o.jquery&&o.length==1&&(o=o[0],s=!0),r.push(o),o}),s?r:r.join("")};return r?s():this.then(s)},renderEach:function(t,n,r,i){return a(n)&&(i=r,r=n,n=null),this.load(t).then(function(s){var o=this;r||(r=a(this.previous_content)?this.previous_content:[]);if(!i)return this.collect(r,function(e,r){var i={},o=this.next_engine||t;return n?i[n]=r:i=r,this.event_context.interpolate(s,i,o)},!0);e.each(r,function(e,r){var u={},a=this.next_engine||t;n?u[n]=r:u=r,i(r,o.event_context.interpolate(s,u,a))})})},interpolate:function(e,t,n){var r=this;return this.then(function(i,s){!e&&s&&(e=s),this.next_engine&&(t=this.next_engine,this.next_engine=!1);var o=r.event_context.interpolate(i,e,t,this.partials);return n?s+o:o})},swap:function(e){return this.then(function(t){return this.event_context.swap(t,e),t}).trigger("changed",{})},appendTo:function(t){return this.then(function(n){e(t).append(n)}).trigger("changed",{})},prependTo:function(t){return this.then(function(n){e(t).prepend(n)}).trigger("changed",{})},replace:function(t){return this.then(function(n){e(t).html(n)}).trigger("changed",{})},trigger:function(e,t){return this.then(function(n){return typeof t=="undefined"&&(t={content:n}),this.event_context.trigger(e,t),n})}}),n.EventContext=function(e,t,r,i,s){this.app=e,this.verb=t,this.path=r,this.params=new n.Object(i),this.target=s},n.EventContext.prototype=e.extend({},n.Object.prototype,{$element:function(){return this.app.$element(o(arguments).shift())},engineFor:function(e){var t=this,n;if(u(e))return e;e=(e||t.app.template_engine).toString();if(n=e.match(/\.([^\.\?\#]+)$/))e=n[1];return e&&u(t[e])?t[e]:t.app.template_engine?this.engineFor(t.app.template_engine):function(e,t){return e}},interpolate:function(e,t,n,r){return this.engineFor(n).apply(this,[e,t,r])},render:function(e,t,r,i){return(new n.RenderContext(this)).render(e,t,r,i)},renderEach:function(e,t,r,i){return(new n.RenderContext(this)).renderEach(e,t,r,i)},load:function(e,t,r){return(new n.RenderContext(this)).load(e,t,r)},partial:function(e,t,r,i){return(new n.RenderContext(this)).partial(e,t,r,i)},send:function(){var e=new n.RenderContext(this);return e.send.apply(e,arguments)},redirect:function(){var t,n=o(arguments),r=this.app.getLocation(),i=n.length;if(i>1){var s=0,u=[],a=[],f={},l=!1;for(;s<i;s++)typeof n[s]=="string"?u.push(n[s]):(e.extend(f,n[s]),l=!0);t=u.join("/");if(l){for(var c in f)a.push(this.app._encodeFormPair(c,f[c]));t+="?"+a.join("&")}}else t=n[0];this.trigger("redirect",{to:t}),this.app.last_location=[this.verb,this.path],this.app.setLocation(t),(new RegExp(t)).test(r)&&this.app.trigger("location-changed")},trigger:function(e,t){return typeof t=="undefined"&&(t={}),t.context||(t.context=this),this.app.trigger(e,t)},eventNamespace:function(){return this.app.eventNamespace()},swap:function(e,t){return this.app.swap(e,t)},notFound:function(){return this.app.notFound(this.verb,this.path)},json:function(t){return e.parseJSON(t)},toString:function(){return"Sammy.EventContext: "+[this.verb,this.path,this.params].join(" ")}}),n})}(jQuery,window),function(){var e={};e.VERSION="1.0.beta.6",e.helpers={},e.partials={},e.registerHelper=function(e,t,n){n&&(t.not=n),this.helpers[e]=t},e.registerPartial=function(e,t){this.partials[e]=t},e.registerHelper("helperMissing",function(e){if(arguments.length===2)return undefined;throw new Error("Could not find property '"+e+"'")});var t=Object.prototype.toString,n="[object Function]";e.registerHelper("blockHelperMissing",function(e,r){var i=r.inverse||function(){},s=r.fn,o="",u=t.call(e);u===n&&(e=e.call(this));if(e===!0)return s(this);if(e===!1||e==null)return i(this);if(u==="[object Array]"){if(e.length>0)for(var a=0,f=e.length;a<f;a++)o+=s(e[a]);else o=i(this);return o}return s(e)}),e.registerHelper("each",function(e,t){var n=t.fn,r=t.inverse,i="";if(e&&e.length>0)for(var s=0,o=e.length;s<o;s++)i+=n(e[s]);else i=r(this);return i}),e.registerHelper("if",function(r,i){var s=t.call(r);return s===n&&(r=r.call(this)),!r||e.Utils.isEmpty(r)?i.inverse(this):i.fn(this)}),e.registerHelper("unless",function(t,n){var r=n.fn,i=n.inverse;return n.fn=i,n.inverse=r,e.helpers["if"].call(this,t,n)}),e.registerHelper("with",function(e,t){return t.fn(e)}),e.registerHelper("log",function(t){e.log(t)});var r=function(){var e={trace:function(){},yy:{},symbols_:{error:2,root:3,program:4,EOF:5,statements:6,simpleInverse:7,statement:8,openInverse:9,closeBlock:10,openBlock:11,mustache:12,partial:13,CONTENT:14,COMMENT:15,OPEN_BLOCK:16,inMustache:17,CLOSE:18,OPEN_INVERSE:19,OPEN_ENDBLOCK:20,path:21,OPEN:22,OPEN_UNESCAPED:23,OPEN_PARTIAL:24,params:25,hash:26,param:27,STRING:28,INTEGER:29,BOOLEAN:30,hashSegments:31,hashSegment:32,ID:33,EQUALS:34,pathSegments:35,SEP:36,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",14:"CONTENT",15:"COMMENT",16:"OPEN_BLOCK",18:"CLOSE",19:"OPEN_INVERSE",20:"OPEN_ENDBLOCK",22:"OPEN",23:"OPEN_UNESCAPED",24:"OPEN_PARTIAL",28:"STRING",29:"INTEGER",30:"BOOLEAN",33:"ID",34:"EQUALS",36:"SEP"},productions_:[0,[3,2],[4,3],[4,1],[4,0],[6,1],[6,2],[8,3],[8,3],[8,1],[8,1],[8,1],[8,1],[11,3],[9,3],[10,3],[12,3],[12,3],[13,3],[13,4],[7,2],[17,3],[17,2],[17,2],[17,1],[25,2],[25,1],[27,1],[27,1],[27,1],[27,1],[26,1],[31,2],[31,1],[32,3],[32,3],[32,3],[32,3],[21,1],[35,3],[35,1]],performAction:function(t,n,r,i,s,o,u){var a=o.length-1;switch(s){case 1:return o[a-1];case 2:this.$=new i.ProgramNode(o[a-2],o[a]);break;case 3:this.$=new i.ProgramNode(o[a]);break;case 4:this.$=new i.ProgramNode([]);break;case 5:this.$=[o[a]];break;case 6:o[a-1].push(o[a]),this.$=o[a-1];break;case 7:this.$=new i.InverseNode(o[a-2],o[a-1],o[a]);break;case 8:this.$=new i.BlockNode(o[a-2],o[a-1],o[a]);break;case 9:this.$=o[a];break;case 10:this.$=o[a];break;case 11:this.$=new i.ContentNode(o[a]);break;case 12:this.$=new i.CommentNode(o[a]);break;case 13:this.$=new i.MustacheNode(o[a-1][0],o[a-1][1]);break;case 14:this.$=new i.MustacheNode(o[a-1][0],o[a-1][1]);break;case 15:this.$=o[a-1];break;case 16:this.$=new i.MustacheNode(o[a-1][0],o[a-1][1]);break;case 17:this.$=new i.MustacheNode(o[a-1][0],o[a-1][1],!0);break;case 18:this.$=new i.PartialNode(o[a-1]);break;case 19:this.$=new i.PartialNode(o[a-2],o[a-1]);break;case 20:break;case 21:this.$=[[o[a-2]].concat(o[a-1]),o[a]];break;case 22:this.$=[[o[a-1]].concat(o[a]),null];break;case 23:this.$=[[o[a-1]],o[a]];break;case 24:this.$=[[o[a]],null];break;case 25:o[a-1].push(o[a]),this.$=o[a-1];break;case 26:this.$=[o[a]];break;case 27:this.$=o[a];break;case 28:this.$=new i.StringNode(o[a]);break;case 29:this.$=new i.IntegerNode(o[a]);break;case 30:this.$=new i.BooleanNode(o[a]);break;case 31:this.$=new i.HashNode(o[a]);break;case 32:o[a-1].push(o[a]),this.$=o[a-1];break;case 33:this.$=[o[a]];break;case 34:this.$=[o[a-2],o[a]];break;case 35:this.$=[o[a-2],new i.StringNode(o[a])];break;case 36:this.$=[o[a-2],new i.IntegerNode(o[a])];break;case 37:this.$=[o[a-2],new i.BooleanNode(o[a])];break;case 38:this.$=new i.IdNode(o[a]);break;case 39:o[a-2].push(o[a]),this.$=o[a-2];break;case 40:this.$=[o[a]]}},table:[{3:1,4:2,5:[2,4],6:3,8:4,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,11],22:[1,13],23:[1,14],24:[1,15]},{1:[3]},{5:[1,16]},{5:[2,3],7:17,8:18,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,19],20:[2,3],22:[1,13],23:[1,14],24:[1,15]},{5:[2,5],14:[2,5],15:[2,5],16:[2,5],19:[2,5],20:[2,5],22:[2,5],23:[2,5],24:[2,5]},{4:20,6:3,8:4,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,11],20:[2,4],22:[1,13],23:[1,14],24:[1,15]},{4:21,6:3,8:4,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,11],20:[2,4],22:[1,13],23:[1,14],24:[1,15]},{5:[2,9],14:[2,9],15:[2,9],16:[2,9],19:[2,9],20:[2,9],22:[2,9],23:[2,9],24:[2,9]},{5:[2,10],14:[2,10],15:[2,10],16:[2,10],19:[2,10],20:[2,10],22:[2,10],23:[2,10],24:[2,10]},{5:[2,11],14:[2,11],15:[2,11],16:[2,11],19:[2,11],20:[2,11],22:[2,11],23:[2,11],24:[2,11]},{5:[2,12],14:[2,12],15:[2,12],16:[2,12],19:[2,12],20:[2,12],22:[2,12],23:[2,12],24:[2,12]},{17:22,21:23,33:[1,25],35:24},{17:26,21:23,33:[1,25],35:24},{17:27,21:23,33:[1,25],35:24},{17:28,21:23,33:[1,25],35:24},{21:29,33:[1,25],35:24},{1:[2,1]},{6:30,8:4,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,11],22:[1,13],23:[1,14],24:[1,15]},{5:[2,6],14:[2,6],15:[2,6],16:[2,6],19:[2,6],20:[2,6],22:[2,6],23:[2,6],24:[2,6]},{17:22,18:[1,31],21:23,33:[1,25],35:24},{10:32,20:[1,33]},{10:34,20:[1,33]},{18:[1,35]},{18:[2,24],21:40,25:36,26:37,27:38,28:[1,41],29:[1,42],30:[1,43],31:39,32:44,33:[1,45],35:24},{18:[2,38],28:[2,38],29:[2,38],30:[2,38],33:[2,38],36:[1,46]},{18:[2,40],28:[2,40],29:[2,40],30:[2,40],33:[2,40],36:[2,40]},{18:[1,47]},{18:[1,48]},{18:[1,49]},{18:[1,50],21:51,33:[1,25],35:24},{5:[2,2],8:18,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,11],20:[2,2],22:[1,13],23:[1,14],24:[1,15]},{14:[2,20],15:[2,20],16:[2,20],19:[2,20],22:[2,20],23:[2,20],24:[2,20]},{5:[2,7],14:[2,7],15:[2,7],16:[2,7],19:[2,7],20:[2,7],22:[2,7],23:[2,7],24:[2,7]},{21:52,33:[1,25],35:24},{5:[2,8],14:[2,8],15:[2,8],16:[2,8],19:[2,8],20:[2,8],22:[2,8],23:[2,8],24:[2,8]},{14:[2,14],15:[2,14],16:[2,14],19:[2,14],20:[2,14],22:[2,14],23:[2,14],24:[2,14]},{18:[2,22],21:40,26:53,27:54,28:[1,41],29:[1,42],30:[1,43],31:39,32:44,33:[1,45],35:24},{18:[2,23]},{18:[2,26],28:[2,26],29:[2,26],30:[2,26],33:[2,26]},{18:[2,31],32:55,33:[1,56]},{18:[2,27],28:[2,27],29:[2,27],30:[2,27],33:[2,27]},{18:[2,28],28:[2,28],29:[2,28],30:[2,28],33:[2,28]},{18:[2,29],28:[2,29],29:[2,29],30:[2,29],33:[2,29]},{18:[2,30],28:[2,30],29:[2,30],30:[2,30],33:[2,30]},{18:[2,33],33:[2,33]},{18:[2,40],28:[2,40],29:[2,40],30:[2,40],33:[2,40],34:[1,57],36:[2,40]},{33:[1,58]},{14:[2,13],15:[2,13],16:[2,13],19:[2,13],20:[2,13],22:[2,13],23:[2,13],24:[2,13]},{5:[2,16],14:[2,16],15:[2,16],16:[2,16],19:[2,16],20:[2,16],22:[2,16],23:[2,16],24:[2,16]},{5:[2,17],14:[2,17],15:[2,17],16:[2,17],19:[2,17],20:[2,17],22:[2,17],23:[2,17],24:[2,17]},{5:[2,18],14:[2,18],15:[2,18],16:[2,18],19:[2,18],20:[2,18],22:[2,18],23:[2,18],24:[2,18]},{18:[1,59]},{18:[1,60]},{18:[2,21]},{18:[2,25],28:[2,25],29:[2,25],30:[2,25],33:[2,25]},{18:[2,32],33:[2,32]},{34:[1,57]},{21:61,28:[1,62],29:[1,63],30:[1,64],33:[1,25],35:24},{18:[2,39],28:[2,39],29:[2,39],30:[2,39],33:[2,39],36:[2,39]},{5:[2,19],14:[2,19],15:[2,19],16:[2,19],19:[2,19],20:[2,19],22:[2,19],23:[2,19],24:[2,19]},{5:[2,15],14:[2,15],15:[2,15],16:[2,15],19:[2,15],20:[2,15],22:[2,15],23:[2,15],24:[2,15]},{18:[2,34],33:[2,34]},{18:[2,35],33:[2,35]},{18:[2,36],33:[2,36]},{18:[2,37],33:[2,37]}],defaultActions:{16:[2,1],37:[2,23],53:[2,21]},parseError:function(t,n){throw new Error(t)},parse:function(t){function d(e){r.length=r.length-2*e,i.length=i.length-e,s.length=s.length-e}function v(){var e;return e=n.lexer.lex()||1,typeof e!="number"&&(e=n.symbols_[e]||e),e}var n=this,r=[0],i=[null],s=[],o=this.table,u="",a=0,f=0,l=0,c=2,h=1;this.lexer.setInput(t),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,typeof this.lexer.yylloc=="undefined"&&(this.lexer.yylloc={});var p=this.lexer.yylloc;s.push(p),typeof this.yy.parseError=="function"&&(this.parseError=this.yy.parseError);var m,g,y,b,w,E,S={},x,T,N,C;for(;;){y=r[r.length-1],this.defaultActions[y]?b=this.defaultActions[y]:(m==null&&(m=v()),b=o[y]&&o[y][m]);if(typeof b=="undefined"||!b.length||!b[0])if(!l){C=[];for(x in o[y])this.terminals_[x]&&x>2&&C.push("'"+this.terminals_[x]+"'");var k="";this.lexer.showPosition?k="Parse error on line "+(a+1)+":\n"+this.lexer.showPosition()+"\nExpecting "+C.join(", ")+", got '"+this.terminals_[m]+"'":k="Parse error on line "+(a+1)+": Unexpected "+(m==1?"end of input":"'"+(this.terminals_[m]||m)+"'"),this.parseError(k,{text:this.lexer.match,token:this.terminals_[m]||m,line:this.lexer.yylineno,loc:p,expected:C})}if(b[0]instanceof Array&&b.length>1)throw new Error("Parse Error: multiple actions possible at state: "+y+", token: "+m);switch(b[0]){case 1:r.push(m),i.push(this.lexer.yytext),s.push(this.lexer.yylloc),r.push(b[1]),m=null,g?(m=g,g=null):(f=this.lexer.yyleng,u=this.lexer.yytext,a=this.lexer.yylineno,p=this.lexer.yylloc,l>0&&l--);break;case 2:T=this.productions_[b[1]][1],S.$=i[i.length-T],S._$={first_line:s[s.length-(T||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(T||1)].first_column,last_column:s[s.length-1].last_column},E=this.performAction.call(S,u,f,a,this.yy,b[1],i,s);if(typeof E!="undefined")return E;T&&(r=r.slice(0,-1*T*2),i=i.slice(0,-1*T),s=s.slice(0,-1*T)),r.push(this.productions_[b[1]][0]),i.push(S.$),s.push(S._$),N=o[r[r.length-2]][r[r.length-1]],r.push(N);break;case 3:return!0}}return!0}},t=function(){var e={EOF:1,parseError:function(t,n){if(!this.yy.parseError)throw new Error(t);this.yy.parseError(t,n)},setInput:function(e){return this._input=e,this._more=this._less=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this},input:function(){var e=this._input[0];this.yytext+=e,this.yyleng++,this.match+=e,this.matched+=e;var t=e.match(/\n/);return t&&this.yylineno++,this._input=this._input.slice(1),e},unput:function(e){return this._input=e+this._input,this},more:function(){return this._more=!0,this},pastInput:function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?"...":"")+e.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var e=this.pastInput(),t=(new Array(e.length+1)).join("-");return e+this.upcomingInput()+"\n"+t+"^"},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,n,r;this._more||(this.yytext="",this.match="");var i=this._currentRules();for(var s=0;s<i.length;s++){t=this._input.match(this.rules[i[s]]);if(t){r=t[0].match(/\n.*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-1:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this._more=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],e=this.performAction.call(this,this.yy,this,i[s],this.conditionStack[this.conditionStack.length-1]);if(e)return e;return}}if(this._input==="")return this.EOF;this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return typeof t!="undefined"?t:this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.pop()},_currentRules:function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function(t){this.begin(t)}};return e.performAction=function(t,n,r,i){var s=i;switch(r){case 0:n.yytext.slice(-1)!=="\\"&&this.begin("mu"),n.yytext.slice(-1)==="\\"&&(n.yytext=n.yytext.substr(0,n.yyleng-1),this.begin("emu"));if(n.yytext)return 14;break;case 1:return 14;case 2:return this.popState(),14;case 3:return 24;case 4:return 16;case 5:return 20;case 6:return 19;case 7:return 19;case 8:return 23;case 9:return 23;case 10:return n.yytext=n.yytext.substr(3,n.yyleng-5),this.popState(),15;case 11:return 22;case 12:return 34;case 13:return 33;case 14:return 33;case 15:return 36;case 16:break;case 17:return this.popState(),18;case 18:return this.popState(),18;case 19:return n.yytext=n.yytext.substr(1,n.yyleng-2).replace(/\\"/g,'"'),28;case 20:return 30;case 21:return 30;case 22:return 29;case 23:return 33;case 24:return n.yytext=n.yytext.substr(1,n.yyleng-2),33;case 25:return"INVALID";case 26:return 5}},e.rules=[/^[^\x00]*?(?=(\{\{))/,/^[^\x00]+/,/^[^\x00]{2,}?(?=(\{\{))/,/^\{\{>/,/^\{\{#/,/^\{\{\//,/^\{\{\^/,/^\{\{\s*else\b/,/^\{\{\{/,/^\{\{&/,/^\{\{![\s\S]*?\}\}/,/^\{\{/,/^=/,/^\.(?=[} ])/,/^\.\./,/^[\/.]/,/^\s+/,/^\}\}\}/,/^\}\}/,/^"(\\["]|[^"])*"/,/^true(?=[}\s])/,/^false(?=[}\s])/,/^[0-9]+(?=[}\s])/,/^[a-zA-Z0-9_$-]+(?=[=}\s\/.])/,/^\[[^\]]*\]/,/^./,/^$/],e.conditions={mu:{rules:[3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26],inclusive:!1},emu:{rules:[2],inclusive:!1},INITIAL:{rules:[0,1,26],inclusive:!0}},e}();return e.lexer=t,e}();e.Parser=r,e.parse=function(t){return e.Parser.yy=e.AST,e.Parser.parse(t)},e.print=function(t){return(new e.PrintVisitor).accept(t)},e.logger={DEBUG:0,INFO:1,WARN:2,ERROR:3,level:3,log:function(e,t){}},e.log=function(t,n){e.logger.log(t,n)},function(){e.AST={},e.AST.ProgramNode=function(t,n){this.type="program",this.statements=t,n&&(this.inverse=new e.AST.ProgramNode(n))},e.AST.MustacheNode=function(e,t,n){this.type="mustache",this.id=e[0],this.params=e.slice(1),this.hash=t,this.escaped=!n},e.AST.PartialNode=function(e,t){this.type="partial",this.id=e,this.context=t};var t=function(t,n){if(t.original!==n.original)throw new e.Exception(t.original+" doesn't match "+n.original)};e.AST.BlockNode=function(e,n,r){t(e.id,r),this.type="block",this.mustache=e,this.program=n},e.AST.InverseNode=function(e,n,r){t(e.id,r),this.type="inverse",this.mustache=e,this.program=n},e.AST.ContentNode=function(e){this.type="content",this.string=e},e.AST.HashNode=function(e){this.type="hash",this.pairs=e},e.AST.IdNode=function(e){this.type="ID",this.original=e.join(".");var t=[],n=0;for(var r=0,i=e.length;r<i;r++){var s=e[r];s===".."?n++:s==="."||s==="this"?this.isScoped=!0:t.push(s)}this.parts=t,this.string=t.join("."),this.depth=n,this.isSimple=t.length===1&&n===0},e.AST.StringNode=function(e){this.type="STRING",this.string=e},e.AST.IntegerNode=function(e){this.type="INTEGER",this.integer=e},e.AST.BooleanNode=function(e){this.type="BOOLEAN",this.bool=e},e.AST.CommentNode=function(e){this.type="comment",this.comment=e}}(),e.Exception=function(e){var t=Error.prototype.constructor.apply(this,arguments);for(var n in t)t.hasOwnProperty(n)&&(this[n]=t[n]);this.message=t.message},e.Exception.prototype=new Error,e.SafeString=function(e){this.string=e},e.SafeString.prototype.toString=function(){return this.string.toString()},function(){var t={"<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},n=/&(?!\w+;)|[<>"'`]/g,r=/[&<>"'`]/,i=function(e){return t[e]||"&amp;"};e.Utils={escapeExpression:function(t){return t instanceof e.SafeString?t.toString():t==null||t===!1?"":r.test(t)?t.replace(n,i):t},isEmpty:function(e){return typeof e=="undefined"?!0:e===null?!0:e===!1?!0:Object.prototype.toString.call(e)==="[object Array]"&&e.length===0?!0:!1}}}(),e.Compiler=function(){},e.JavaScriptCompiler=function(){},function(t,n){t.OPCODE_MAP={appendContent:1,getContext:2,lookupWithHelpers:3,lookup:4,append:5,invokeMustache:6,appendEscaped:7,pushString:8,truthyOrFallback:9,functionOrFallback:10,invokeProgram:11,invokePartial:12,push:13,assignToHash:15,pushStringParam:16},t.MULTI_PARAM_OPCODES={appendContent:1,getContext:1,lookupWithHelpers:2,lookup:1,invokeMustache:3,pushString:1,truthyOrFallback:1,functionOrFallback:1,invokeProgram:3,invokePartial:1,push:1,assignToHash:1,pushStringParam:1},t.DISASSEMBLE_MAP={};for(var r in t.OPCODE_MAP){var i=t.OPCODE_MAP[r];t.DISASSEMBLE_MAP[i]=r}t.multiParamSize=function(e){return t.MULTI_PARAM_OPCODES[t.DISASSEMBLE_MAP[e]]},t.prototype={compiler:t,disassemble:function(){var e=this.opcodes,n,r,i=[],s,o,u;for(var a=0,f=e.length;a<f;a++){n=e[a];if(n==="DECLARE")o=e[++a],u=e[++a],i.push("DECLARE "+o+" = "+u);else{s=t.DISASSEMBLE_MAP[n];var l=t.multiParamSize(n),c=[];for(var h=0;h<l;h++)r=e[++a],typeof r=="string"&&(r='"'+r.replace("\n","\\n")+'"'),c.push(r);s=s+" "+c.join(" "),i.push(s)}}return i.join("\n")},guid:0,compile:function(e,t){this.children=[],this.depths={list:[]},this.options=t;var n=this.options.knownHelpers;this.options.knownHelpers={helperMissing:!0,blockHelperMissing:!0,each:!0,"if":!0,unless:!0,"with":!0,log:!0};if(n)for(var r in n)this.options.knownHelpers[r]=n[r];return this.program(e)},accept:function(e){return this[e.type](e)},program:function(e){var t=e.statements,n;this.opcodes=[];for(var r=0,i=t.length;r<i;r++)n=t[r],this[n.type](n);return this.isSimple=i===1,this.depths.list=this.depths.list.sort(function(e,t){return e-t}),this},compileProgram:function(e){var t=(new this.compiler).compile(e,this.options),n=this.guid++;this.usePartial=this.usePartial||t.usePartial,this.children[n]=t;for(var r=0,i=t.depths.list.length;r<i;r++){depth=t.depths.list[r];if(depth<2)continue;this.addDepth(depth-1)}return n},block:function(e){var t=e.mustache,n,r,i,s,o=this.setupStackForMustache(t),u=this.compileProgram(e.program);e.program.inverse&&(s=this.compileProgram(e.program.inverse),this.declare("inverse",s)),this.opcode("invokeProgram",u,o.length,!!t.hash),this.declare("inverse",null),this.opcode("append")},inverse:function(e){var t=this.setupStackForMustache(e.mustache),n=this.compileProgram(e.program);this.declare("inverse",n),this.opcode("invokeProgram",null,t.length,!!e.mustache.hash),this.declare("inverse",null),this.opcode("append")},hash:function(e){var t=e.pairs,n,r;this.opcode("push","{}");for(var i=0,s=t.length;i<s;i++)n=t[i],r=n[1],this.accept(r),this.opcode("assignToHash",n[0])},partial:function(e){var t=e.id;this.usePartial=!0,e.context?this.ID(e.context):this.opcode("push","depth0"),this.opcode("invokePartial",t.original),this.opcode("append")},content:function(e){this.opcode("appendContent",e.string)},mustache:function(e){var t=this.setupStackForMustache(e);this.opcode("invokeMustache",t.length,e.id.original,!!e.hash),e.escaped&&!this.options.noEscape?this.opcode("appendEscaped"):this.opcode("append")},ID:function(e){this.addDepth(e.depth),this.opcode("getContext",e.depth),this.opcode("lookupWithHelpers",e.parts[0]||null,e.isScoped||!1);for(var t=1,n=e.parts.length;t<n;t++)this.opcode("lookup",e.parts[t])},STRING:function(e){this.opcode("pushString",e.string)},INTEGER:function(e){this.opcode("push",e.integer)},BOOLEAN:function(e){this.opcode("push",e.bool)},comment:function(){},pushParams:function(e){var t=e.length,n;while(t--)n=e[t],this.options.stringParams?(n.depth&&this.addDepth(n.depth),this.opcode("getContext",n.depth||0),this.opcode("pushStringParam",n.string)):this[n.type](n)},opcode:function(e,n,r,i){this.opcodes.push(t.OPCODE_MAP[e]),n!==undefined&&this.opcodes.push(n),r!==undefined&&this.opcodes.push(r),i!==undefined&&this.opcodes.push(i)},declare:function(e,t){this.opcodes.push("DECLARE"),this.opcodes.push(e),this.opcodes.push(t)},addDepth:function(e){if(e===0)return;this.depths[e]||(this.depths[e]=!0,this.depths.list.push(e))},setupStackForMustache:function(e){var t=e.params;return this.pushParams(t),e.hash&&this.hash(e.hash),this.ID(e.id),t}},n.prototype={nameLookup:function(e,t,r){return/^[0-9]+$/.test(t)?e+"["+t+"]":n.isValidJavaScriptVariableName(t)?e+"."+t:e+"['"+t+"']"},appendToBuffer:function(e){return this.environment.isSimple?"return "+e+";":"buffer += "+e+";"},initializeBuffer:function(){return this.quotedString("")},namespace:"Handlebars",compile:function(e,t,n,r){this.environment=e,this.options=t||{},this.name=this.environment.name,this.isChild=!!n,this.context=n||{programs:[],aliases:{self:"this"},registers:{list:[]}},this.preamble(),this.stackSlot=0,this.stackVars=[],this.compileChildren(e,t);var i=e.opcodes,s;this.i=0;for(a=i.length;this.i<a;this.i++)s=this.nextOpcode(0),s[0]==="DECLARE"?(this.i=this.i+2,this[s[1]]=s[2]):(this.i=this.i+s[1].length,this[s[0]].apply(this,s[1]));return this.createFunctionContext(r)},nextOpcode:function(e){var n=this.environment.opcodes,r=n[this.i+e],i,s,o,u;if(r==="DECLARE")return i=n[this.i+1],s=n[this.i+2],["DECLARE",i,s];i=t.DISASSEMBLE_MAP[r],o=t.multiParamSize(r),u=[];for(var a=0;a<o;a++)u.push(n[this.i+a+1+e]);return[i,u]},eat:function(e){this.i=this.i+e.length},preamble:function(){var e=[];this.useRegister("foundHelper");if(!this.isChild){var t=this.namespace,n="helpers = helpers || "+t+".helpers;";this.environment.usePartial&&(n=n+" partials = partials || "+t+".partials;"),e.push(n)}else e.push("");this.environment.isSimple?e.push(""):e.push(", buffer = "+this.initializeBuffer()),this.lastContext=0,this.source=e},createFunctionContext:function(t){var n=this.stackVars;this.isChild||(n=n.concat(this.context.registers.list)),n.length>0&&(this.source[1]=this.source[1]+", "+n.join(", "));if(!this.isChild){var r=[];for(var i in this.context.aliases)this.source[1]=this.source[1]+", "+i+"="+this.context.aliases[i]}this.source[1]&&(this.source[1]="var "+this.source[1].substring(2)+";"),this.isChild||(this.source[1]+="\n"+this.context.programs.join("\n")+"\n"),this.environment.isSimple||this.source.push("return buffer;");var s=this.isChild?["depth0","data"]:["Handlebars","depth0","helpers","partials","data"];for(var o=0,u=this.environment.depths.list.length;o<u;o++)s.push("depth"+this.environment.depths.list[o]);if(t)return s.push(this.source.join("\n  ")),Function.apply(this,s);var a="function "+(this.name||"")+"("+s.join(",")+") {\n  "+this.source.join("\n  ")+"}";return e.log(e.logger.DEBUG,a+"\n\n"),a},appendContent:function(e){this.source.push(this.appendToBuffer(this.quotedString(e)))},append:function(){var e=this.popStack();this.source.push("if("+e+" || "+e+" === 0) { "+this.appendToBuffer(e)+" }"),this.environment.isSimple&&this.source.push("else { "+this.appendToBuffer("''")+" }")},appendEscaped:function(){var e=this.nextOpcode(1),t="";this.context.aliases.escapeExpression="this.escapeExpression",e[0]==="appendContent"&&(t=" + "+this.quotedString(e[1][0]),this.eat(e)),this.source.push(this.appendToBuffer("escapeExpression("+this.popStack()+")"+t))},getContext:function(e){this.lastContext!==e&&(this.lastContext=e)},lookupWithHelpers:function(e,t){if(e){var n=this.nextStack();this.usingKnownHelper=!1;var r;!t&&this.options.knownHelpers[e]?(r=n+" = "+this.nameLookup("helpers",e,"helper"),this.usingKnownHelper=!0):t||this.options.knownHelpersOnly?r=n+" = "+this.nameLookup("depth"+this.lastContext,e,"context"):(this.register("foundHelper",this.nameLookup("helpers",e,"helper")),r=n+" = foundHelper || "+this.nameLookup("depth"+this.lastContext,e,"context")),r+=";",this.source.push(r)}else this.pushStack("depth"+this.lastContext)},lookup:function(e){var t=this.topStack();this.source.push(t+" = ("+t+" === null || "+t+" === undefined || "+t+" === false ? "+t+" : "+this.nameLookup(t,e,"context")+");")},pushStringParam:function(e){this.pushStack("depth"+this.lastContext),this.pushString(e)},pushString:function(e){this.pushStack(this.quotedString(e))},push:function(e){this.pushStack(e)},invokeMustache:function(e,t,n){this.populateParams(e,this.quotedString(t),"{}",null,n,function(e,t,n){this.usingKnownHelper||(this.context.aliases.helperMissing="helpers.helperMissing",this.context.aliases.undef="void 0",this.source.push("else if("+n+"=== undef) { "+e+" = helperMissing.call("+t+"); }"),e!==n&&this.source.push("else { "+e+" = "+n+"; }"))})},invokeProgram:function(e,t,n){var r=this.programExpression(this.inverse),i=this.programExpression(e);this.populateParams(t,null,i,r,n,function(e,t,n){this.usingKnownHelper||(this.context.aliases.blockHelperMissing="helpers.blockHelperMissing",this.source.push("else { "+e+" = blockHelperMissing.call("+t+"); }"))})},populateParams:function(e,t,n,r,i,s){var o=i||this.options.stringParams||r||this.options.data,u=this.popStack(),a,f=[],l,c,h;o?(this.register("tmp1",n),h="tmp1"):h="{ hash: {} }";if(o){var p=i?this.popStack():"{}";this.source.push("tmp1.hash = "+p+";")}this.options.stringParams&&this.source.push("tmp1.contexts = [];");for(var d=0;d<e;d++)l=this.popStack(),f.push(l),this.options.stringParams&&this.source.push("tmp1.contexts.push("+this.popStack()+");");r&&(this.source.push("tmp1.fn = tmp1;"),this.source.push("tmp1.inverse = "+r+";")),this.options.data&&this.source.push("tmp1.data = data;"),f.push(h),this.populateCall(f,u,t||u,s,n!=="{}")},populateCall:function(e,t,n,r,i){var s=["depth0"].concat(e).join(", "),o=["depth0"].concat(n).concat(e).join(", "),u=this.nextStack();if(this.usingKnownHelper)this.source.push(u+" = "+t+".call("+s+");");else{this.context.aliases.functionType='"function"';var a=i?"foundHelper && ":"";this.source.push("if("+a+"typeof "+t+" === functionType) { "+u+" = "+t+".call("+s+"); }")}r.call(this,u,o,t),this.usingKnownHelper=!1},invokePartial:function(e){params=[this.nameLookup("partials",e,"partial"),"'"+e+"'",this.popStack(),"helpers","partials"],this.options.data&&params.push("data"),this.pushStack("self.invokePartial("+params.join(", ")+");")},assignToHash:function(e){var t=this.popStack(),n=this.topStack();this.source.push(n+"['"+e+"'] = "+t+";")},compiler:n,compileChildren:function(e,t){var n=e.children,r,i;for(var s=0,o=n.length;s<o;s++){r=n[s],i=new this.compiler,this.context.programs.push("");var u=this.context.programs.length;r.index=u,r.name="program"+u,this.context.programs[u]=i.compile(r,t,this.context)}},programExpression:function(e){if(e==null)return"self.noop";var t=this.environment.children[e],n=t.depths.list,r=[t.index,t.name,"data"];for(var i=0,s=n.length;i<s;i++)depth=n[i],depth===1?r.push("depth0"):r.push("depth"+(depth-1));return n.length===0?"self.program("+r.join(", ")+")":(r.shift(),"self.programWithDepth("+r.join(", ")+")")},register:function(e,t){this.useRegister(e),this.source.push(e+" = "+t+";")},useRegister:function(e){this.context.registers[e]||(this.context.registers[e]=!0,this.context.registers.list.push(e))},pushStack:function(e){return this.source.push(this.nextStack()+" = "+e+";"),"stack"+this.stackSlot},nextStack:function(){return this.stackSlot++,this.stackSlot>this.stackVars.length&&this.stackVars.push("stack"+this.stackSlot),"stack"+this.stackSlot},popStack:function(){return"stack"+this.stackSlot--},topStack:function(){return"stack"+this.stackSlot},quotedString:function(e){return'"'+e.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r")+'"'}};var s="break else new var case finally return void catch for switch while continue function this with default if throw delete in try do instanceof typeof abstract enum int short boolean export interface static byte extends long super char final native synchronized class float package throws const goto private transient debugger implements protected volatile double import public let yield".split(" "),o=n.RESERVED_WORDS={};for(var u=0,a=s.length;u<a;u++)o[s[u]]=!0;n.isValidJavaScriptVariableName=function(e){return!n.RESERVED_WORDS[e]&&/^[a-zA-Z_$][0-9a-zA-Z_$]+$/.test(e)?!0:!1}}(e.Compiler,e.JavaScriptCompiler),e.precompile=function(t,n){n=n||{};var r=e.parse(t),i=(new e.Compiler).compile(r,n);return(new e.JavaScriptCompiler).compile(i,n)},e.compile=function(t,n){function i(){var r=e.parse(t),i=(new e.Compiler).compile(r,n),s=(new e.JavaScriptCompiler).compile(i,n,undefined,!0);return e.template(s)}n=n||{};var r;return function(e,t){return r||(r=i()),r.call(this,e,t)}},e.VM={template:function(t){var n={escapeExpression:e.Utils.escapeExpression,invokePartial:e.VM.invokePartial,programs:[],program:function(t,n,r){var i=this.programs[t];return r?e.VM.program(n,r):i?i:(i=this.programs[t]=e.VM.program(n),i)},programWithDepth:e.VM.programWithDepth,noop:e.VM.noop};return function(r,i){return i=i||{},t.call(n,e,r,i.helpers,i.partials,i.data)}},programWithDepth:function(e,t,n){var r=Array.prototype.slice.call(arguments,2);return function(n,i){return i=i||{},e.apply(this,[n,i.data||t].concat(r))}},program:function(e,t){return function(n,r){return r=r||{},e(n,r.data||t)}},noop:function(){return""},invokePartial:function(t,n,r,i,s,o){options={helpers:i,partials:s,data:o};if(t===undefined)throw new e.Exception("The partial "+n+" could not be found");if(t instanceof Function)return t(r,options);if(!e.compile)throw new e.Exception("The partial "+n+" could not be compiled when running in runtime-only mode");return s[n]=e.compile(t),s[n](r,options)}},e.template=e.VM.template,define("handlebars",[],function(){return e})}(),function(e,t,n,r){var i=!0;!function(t){if(typeof require=="function"&&typeof exports=="object"&&typeof module=="object"){var n=module.exports||exports;t(n)}else typeof define=="function"&&define.amd?define("knockout",["exports"],t):t(e.ko={})}(function(s){function u(e){var t=this;if(e)for(var n in e){var r=o.extenders[n];typeof r=="function"&&(t=r(t,e[n]))}return t}function p(e,t,n){n&&t!==o.selectExtensions.readValue(e)&&o.selectExtensions.writeValue(e,t),t!==o.selectExtensions.readValue(e)&&o.utils.triggerEvent(e,"change")}var o=typeof s!="undefined"?s:{};o.exportSymbol=function(e,t){var n=e.split("."),r=o;for(var i=0;i<n.length-1;i++)r=r[n[i]];r[n[n.length-1]]=t},o.exportProperty=function(e,t,n){e[t]=n},o.version="2.1.0",o.exportSymbol("version",o.version),o.utils=new function(){function g(e,t){if(o.utils.tagNameLower(e)!=="input"||!e.type)return!1;if(t.toLowerCase()!="click")return!1;var n=e.type;return n=="checkbox"||n=="radio"}var i=/^(\s|\u00A0)+|(\s|\u00A0)+$/g,s={},u={},a=/Firefox\/2/i.test(n.userAgent)?"KeyboardEvent":"UIEvents";s[a]=["keyup","keydown","keypress"],s.MouseEvents=["click","dblclick","mousedown","mouseup","mousemove","mouseover","mouseout","mouseenter","mouseleave"];for(var f in s){var l=s[f];if(l.length)for(var c=0,h=l.length;c<h;c++)u[l[c]]=f}var p={propertychange:!0},d=function(){var e=3,n=t.createElement("div"),i=n.getElementsByTagName("i");while(n.innerHTML="<!--[if gt IE "+ ++e+"]><i></i><![endif]-->",i[0]);return e>4?e:r}(),v=d===6,m=d===7;return{fieldsIncludedWithJsonPost:["authenticity_token",/^__RequestVerificationToken(_.*)?$/],arrayForEach:function(e,t){for(var n=0,r=e.length;n<r;n++)t(e[n])},arrayIndexOf:function(e,t){if(typeof Array.prototype.indexOf=="function")return Array.prototype.indexOf.call(e,t);for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},arrayFirst:function(e,t,n){for(var r=0,i=e.length;r<i;r++)if(t.call(n,e[r]))return e[r];return null},arrayRemoveItem:function(e,t){var n=o.utils.arrayIndexOf(e,t);n>=0&&e.splice(n,1)},arrayGetDistinctValues:function(e){e=e||[];var t=[];for(var n=0,r=e.length;n<r;n++)o.utils.arrayIndexOf(t,e[n])<0&&t.push(e[n]);return t},arrayMap:function(e,t){e=e||[];var n=[];for(var r=0,i=e.length;r<i;r++)n.push(t(e[r]));return n},arrayFilter:function(e,t){e=e||[];var n=[];for(var r=0,i=e.length;r<i;r++)t(e[r])&&n.push(e[r]);return n},arrayPushAll:function(e,t){if(t instanceof Array)e.push.apply(e,t);else for(var n=0,r=t.length;n<r;n++)e.push(t[n]);return e},extend:function(e,t){if(t)for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e},emptyDomNode:function(e){while(e.firstChild)o.removeNode(e.firstChild)},moveCleanedNodesToContainerElement:function(e){var n=o.utils.makeArray(e),r=t.createElement("div");for(var i=0,s=n.length;i<s;i++)o.cleanNode(n[i]),r.appendChild(n[i]);return r},setDomNodeChildren:function(e,t){o.utils.emptyDomNode(e);if(t)for(var n=0,r=t.length;n<r;n++)e.appendChild(t[n])},replaceDomNodes:function(e,t){var n=e.nodeType?[e]:e;if(n.length>0){var r=n[0],i=r.parentNode;for(var s=0,u=t.length;s<u;s++)i.insertBefore(t[s],r);for(var s=0,u=n.length;s<u;s++)o.removeNode(n[s])}},setOptionNodeSelectionState:function(e,t){n.userAgent.indexOf("MSIE 6")>=0?e.setAttribute("selected",t):e.selected=t},stringTrim:function(e){return(e||"").replace(i,"")},stringTokenize:function(e,t){var n=[],r=(e||"").split(t);for(var i=0,s=r.length;i<s;i++){var u=o.utils.stringTrim(r[i]);u!==""&&n.push(u)}return n},stringStartsWith:function(e,t){return e=e||"",t.length>e.length?!1:e.substring(0,t.length)===t},buildEvalWithinScopeFunction:function(e,t){var n="return ("+e+")";for(var r=0;r<t;r++)n="with(sc["+r+"]) { "+n+" } ";return new Function("sc",n)},domNodeIsContainedBy:function(e,t){if(t.compareDocumentPosition)return(t.compareDocumentPosition(e)&16)==16;while(e!=null){if(e==t)return!0;e=e.parentNode}return!1},domNodeIsAttachedToDocument:function(e){return o.utils.domNodeIsContainedBy(e,e.ownerDocument)},tagNameLower:function(e){return e&&e.tagName&&e.tagName.toLowerCase()},registerEventHandler:function(e,t,n){var r=d&&p[t];if(!r&&typeof jQuery!="undefined"){if(g(e,t)){var i=n;n=function(e,t){var n=this.checked;t&&(this.checked=t.checkedStateBeforeEvent!==!0),i.call(this,e),this.checked=n}}jQuery(e).bind(t,n)}else if(!r&&typeof e.addEventListener=="function")e.addEventListener(t,n,!1);else{if(typeof e.attachEvent=="undefined")throw new Error("Browser doesn't support addEventListener or attachEvent");e.attachEvent("on"+t,function(t){n.call(e,t)})}},triggerEvent:function(n,r){if(!n||!n.nodeType)throw new Error("element must be a DOM node when calling triggerEvent");if(typeof jQuery!="undefined"){var i=[];g(n,r)&&i.push({checkedStateBeforeEvent:n.checked}),jQuery(n).trigger(r,i)}else if(typeof t.createEvent=="function"){if(typeof n.dispatchEvent!="function")throw new Error("The supplied element doesn't support dispatchEvent");var s=u[r]||"HTMLEvents",o=t.createEvent(s);o.initEvent(r,!0,!0,e,0,0,0,0,0,!1,!1,!1,!1,0,n),n.dispatchEvent(o)}else{if(typeof n.fireEvent=="undefined")throw new Error("Browser doesn't support triggering events");g(n,r)&&(n.checked=n.checked!==!0),n.fireEvent("on"+r)}},unwrapObservable:function(e){return o.isObservable(e)?e():e},toggleDomNodeCssClass:function(e,t,n){var r=(e.className||"").split(/\s+/),i=o.utils.arrayIndexOf(r,t)>=0;if(n&&!i)e.className+=(r[0]?" ":"")+t;else if(i&&!n){var s="";for(var u=0;u<r.length;u++)r[u]!=t&&(s+=r[u]+" ");e.className=o.utils.stringTrim(s)}},setTextContent:function(e,t){var n=o.utils.unwrapObservable(t);if(n===null||n===r)n="";"innerText"in e?e.innerText=n:e.textContent=n,d>=9&&(e.style.display=e.style.display)},ensureSelectElementIsRenderedCorrectly:function(e){if(d>=9){var t=e.style.width;e.style.width=0,e.style.width=t}},range:function(e,t){e=o.utils.unwrapObservable(e),t=o.utils.unwrapObservable(t);var n=[];for(var r=e;r<=t;r++)n.push(r);return n},makeArray:function(e){var t=[];for(var n=0,r=e.length;n<r;n++)t.push(e[n]);return t},isIe6:v,isIe7:m,ieVersion:d,getFormFields:function(e,t){var n=o.utils.makeArray(e.getElementsByTagName("input")).concat(o.utils.makeArray(e.getElementsByTagName("textarea"))),r=typeof t=="string"?function(e){return e.name===t}:function(e){return t.test(e.name)},i=[];for(var s=n.length-1;s>=0;s--)r(n[s])&&i.push(n[s]);return i},parseJson:function(t){if(typeof t=="string"){t=o.utils.stringTrim(t);if(t)return e.JSON&&e.JSON.parse?e.JSON.parse(t):(new Function("return "+t))()}return null},stringifyJson:function(e,t,n){if(typeof JSON=="undefined"||typeof JSON.stringify=="undefined")throw new Error("Cannot find JSON.stringify(). Some browsers (e.g., IE < 8) don't support it natively, but you can overcome this by adding a script reference to json2.js, downloadable from http://www.json.org/json2.js");return JSON.stringify(o.utils.unwrapObservable(e),t,n)},postJson:function(e,n,r){r=r||{};var i=r.params||{},s=r.includeFields||this.fieldsIncludedWithJsonPost,u=e;if(typeof e=="object"&&o.utils.tagNameLower(e)==="form"){var a=e;u=a.action;for(var f=s.length-1;f>=0;f--){var l=o.utils.getFormFields(a,s[f]);for(var c=l.length-1;c>=0;c--)i[l[c].name]=l[c].value}}n=o.utils.unwrapObservable(n);var h=t.createElement("form");h.style.display="none",h.action=u,h.method="post";for(var p in n){var d=t.createElement("input");d.name=p,d.value=o.utils.stringifyJson(o.utils.unwrapObservable(n[p])),h.appendChild(d)}for(var p in i){var d=t.createElement("input");d.name=p,d.value=i[p],h.appendChild(d)}t.body.appendChild(h),r.submitter?r.submitter(h):h.submit(),setTimeout(function(){h.parentNode.removeChild(h)},0)}}},o.exportSymbol("utils",o.utils),o.exportSymbol("utils.arrayForEach",o.utils.arrayForEach),o.exportSymbol("utils.arrayFirst",o.utils.arrayFirst),o.exportSymbol("utils.arrayFilter",o.utils.arrayFilter),o.exportSymbol("utils.arrayGetDistinctValues",o.utils.arrayGetDistinctValues),o.exportSymbol("utils.arrayIndexOf",o.utils.arrayIndexOf),o.exportSymbol("utils.arrayMap",o.utils.arrayMap),o.exportSymbol("utils.arrayPushAll",o.utils.arrayPushAll),o.exportSymbol("utils.arrayRemoveItem",o.utils.arrayRemoveItem),o.exportSymbol("utils.extend",o.utils.extend),o.exportSymbol("utils.fieldsIncludedWithJsonPost",o.utils.fieldsIncludedWithJsonPost),o.exportSymbol("utils.getFormFields",o.utils.getFormFields),o.exportSymbol("utils.postJson",o.utils.postJson),o.exportSymbol("utils.parseJson",o.utils.parseJson),o.exportSymbol("utils.registerEventHandler",o.utils.registerEventHandler),o.exportSymbol("utils.stringifyJson",o.utils.stringifyJson),o.exportSymbol("utils.range",o.utils.range),o.exportSymbol("utils.toggleDomNodeCssClass",o.utils.toggleDomNodeCssClass),o.exportSymbol("utils.triggerEvent",o.utils.triggerEvent),o.exportSymbol("utils.unwrapObservable",o.utils.unwrapObservable),Function.prototype.bind||(Function.prototype.bind=function(e){var t=this,n=Array.prototype.slice.call(arguments),e=n.shift();return function(){return t.apply(e,n.concat(Array.prototype.slice.call(arguments)))}}),o.utils.domData=new function(){var e=0,t="__ko__"+(new Date).getTime(),n={};return{get:function(e,t){var n=o.utils.domData.getAll(e,!1);return n===r?r:n[t]},set:function(e,t,n){if(n===r&&o.utils.domData.getAll(e,!1)===r)return;var i=o.utils.domData.getAll(e,!0);i[t]=n},getAll:function(i,s){var o=i[t],u=o&&o!=="null";if(!u){if(!s)return r;o=i[t]="ko"+e++,n[o]={}}return n[o]},clear:function(e){var r=e[t];r&&(delete n[r],e[t]=null)}}},o.exportSymbol("utils.domData",o.utils.domData),o.exportSymbol("utils.domData.clear",o.utils.domData.clear),o.utils.domNodeDisposal=new function(){function i(t,n){var i=o.utils.domData.get(t,e);return i===r&&n&&(i=[],o.utils.domData.set(t,e,i)),i}function s(t){o.utils.domData.set(t,e,r)}function u(e){var t=i(e,!1);if(t){t=t.slice(0);for(var r=0;r<t.length;r++)t[r](e)}o.utils.domData.clear(e),typeof jQuery=="function"&&typeof jQuery["cleanData"]=="function"&&jQuery.cleanData([e]),n[e.nodeType]&&a(e)}function a(e){var t,n=e.firstChild;while(t=n)n=t.nextSibling,t.nodeType===8&&u(t)}var e="__ko_domNodeDisposal__"+(new Date).getTime(),t={1:!0,8:!0,9:!0},n={1:!0,9:!0};return{addDisposeCallback:function(e,t){if(typeof t!="function")throw new Error("Callback must be a function");i(e,!0).push(t)},removeDisposeCallback:function(e,t){var n=i(e,!1);n&&(o.utils.arrayRemoveItem(n,t),n.length==0&&s(e))},cleanNode:function(e){if(t[e.nodeType]){u(e);if(n[e.nodeType]){var r=[];o.utils.arrayPushAll(r,e.getElementsByTagName("*"));for(var i=0,s=r.length;i<s;i++)u(r[i])}}},removeNode:function(e){o.cleanNode(e),e.parentNode&&e.parentNode.removeChild(e)}}},o.cleanNode=o.utils.domNodeDisposal.cleanNode,o.removeNode=o.utils.domNodeDisposal.removeNode,o.exportSymbol("cleanNode",o.cleanNode),o.exportSymbol("removeNode",o.removeNode),o.exportSymbol("utils.domNodeDisposal",o.utils.domNodeDisposal),o.exportSymbol("utils.domNodeDisposal.addDisposeCallback",o.utils.domNodeDisposal.addDisposeCallback),o.exportSymbol("utils.domNodeDisposal.removeDisposeCallback",o.utils.domNodeDisposal.removeDisposeCallback),function(){function i(n){var r=o.utils.stringTrim(n).toLowerCase(),i=t.createElement("div"),s=r.match(/^<(thead|tbody|tfoot)/)&&[1,"<table>","</table>"]||!r.indexOf("<tr")&&[2,"<table><tbody>","</tbody></table>"]||(!r.indexOf("<td")||!r.indexOf("<th"))&&[3,"<table><tbody><tr>","</tr></tbody></table>"]||[0,"",""],u="ignored<div>"+s[1]+n+s[2]+"</div>";typeof e["innerShiv"]=="function"?i.appendChild(e.innerShiv(u)):i.innerHTML=u;while(s[0]--)i=i.lastChild;return o.utils.makeArray(i.lastChild.childNodes)}function s(e){var t=jQuery.clean([e]);if(t&&t[0]){var n=t[0];while(n.parentNode&&n.parentNode.nodeType!==11)n=n.parentNode;n.parentNode&&n.parentNode.removeChild(n)}return t}var n=/^(\s*)<!--(.*?)-->/;o.utils.parseHtmlFragment=function(e){return typeof jQuery!="undefined"?s(e):i(e)},o.utils.setHtml=function(e,t){o.utils.emptyDomNode(e);if(t!==null&&t!==r){typeof t!="string"&&(t=t.toString());if(typeof jQuery!="undefined")jQuery(e).html(t);else{var n=o.utils.parseHtmlFragment(t);for(var i=0;i<n.length;i++)e.appendChild(n[i])}}}}(),o.exportSymbol("utils.parseHtmlFragment",o.utils.parseHtmlFragment),o.exportSymbol("utils.setHtml",o.utils.setHtml),o.memoization=function(){function t(){return((1+Math.random())*4294967296|0).toString(16).substring(1)}function n(){return t()+t()}function i(e,t){if(!e)return;if(e.nodeType==8){var n=o.memoization.parseMemoText(e.nodeValue);n!=null&&t.push({domNode:e,memoId:n})}else if(e.nodeType==1)for(var r=0,s=e.childNodes,u=s.length;r<u;r++)i(s[r],t)}var e={};return{memoize:function(t){if(typeof t!="function")throw new Error("You can only pass a function to ko.memoization.memoize()");var r=n();return e[r]=t,"<!--[ko_memo:"+r+"]-->"},unmemoize:function(t,n){var i=e[t];if(i===r)throw new Error("Couldn't find any memo with ID "+t+". Perhaps it's already been unmemoized.");try{return i.apply(null,n||[]),!0}finally{delete e[t]}},unmemoizeDomNodeAndDescendants:function(e,t){var n=[];i(e,n);for(var r=0,s=n.length;r<s;r++){var u=n[r].domNode,a=[u];t&&o.utils.arrayPushAll(a,t),o.memoization.unmemoize(n[r].memoId,a),u.nodeValue="",u.parentNode&&u.parentNode.removeChild(u)}},parseMemoText:function(e){var t=e.match(/^\[ko_memo\:(.*?)\]$/);return t?t[1]:null}}}(),o.exportSymbol("memoization",o.memoization),o.exportSymbol("memoization.memoize",o.memoization.memoize),o.exportSymbol("memoization.unmemoize",o.memoization.unmemoize),o.exportSymbol("memoization.parseMemoText",o.memoization.parseMemoText),o.exportSymbol("memoization.unmemoizeDomNodeAndDescendants",o.memoization.unmemoizeDomNodeAndDescendants),o.extenders={throttle:function(e,t){e.throttleEvaluation=t;var n=null;return o.dependentObservable({read:e,write:function(r){clearTimeout(n),n=setTimeout(function(){e(r)},t)}})},notify:function(e,t){return e.equalityComparer=t=="always"?function(){return!1}:o.observable.fn.equalityComparer,e}},o.exportSymbol("extenders",o.extenders),o.subscription=function(e,t,n){this.target=e,this.callback=t,this.disposeCallback=n,o.exportProperty(this,"dispose",this.dispose)},o.subscription.prototype.dispose=function(){this.isDisposed=!0,this.disposeCallback()},o.subscribable=function(){this._subscriptions={},o.utils.extend(this,o.subscribable.fn),o.exportProperty(this,"subscribe",this.subscribe),o.exportProperty(this,"extend",this.extend),o.exportProperty(this,"getSubscriptionsCount",this.getSubscriptionsCount)};var a="change";o.subscribable.fn={subscribe:function(e,t,n){n=n||a;var r=t?e.bind(t):e,i=new o.subscription(this,r,function(){o.utils.arrayRemoveItem(this._subscriptions[n],i)}.bind(this));return this._subscriptions[n]||(this._subscriptions[n]=[]),this._subscriptions[n].push(i),i},notifySubscribers:function(e,t){t=t||a,this._subscriptions[t]&&o.utils.arrayForEach(this._subscriptions[t].slice(0),function(t){t&&t.isDisposed!==!0&&t.callback(e)})},getSubscriptionsCount:function(){var e=0;for(var t in this._subscriptions)this._subscriptions.hasOwnProperty(t)&&(e+=this._subscriptions[t].length);return e},extend:u},o.isSubscribable=function(e){return typeof e.subscribe=="function"&&typeof e["notifySubscribers"]=="function"},o.exportSymbol("subscribable",o.subscribable),o.exportSymbol("isSubscribable",o.isSubscribable),o.dependencyDetection=function(){var e=[];return{begin:function(t){e.push({callback:t,distinctDependencies:[]})},end:function(){e.pop()},registerDependency:function(t){if(!o.isSubscribable(t))throw new Error("Only subscribable things can act as dependencies");if(e.length>0){var n=e[e.length-1];if(o.utils.arrayIndexOf(n.distinctDependencies,t)>=0)return;n.distinctDependencies.push(t),n.callback(t)}}}}();var f={"undefined":!0,"boolean":!0,number:!0,string:!0};o.observable=function(e){function n(){if(arguments.length>0){if(!n.equalityComparer||!n.equalityComparer(t,arguments[0]))n.valueWillMutate(),t=arguments[0],i&&(n._latestValue=t),n.valueHasMutated();return this}return o.dependencyDetection.registerDependency(n),t}var t=e;return i&&(n._latestValue=t),o.subscribable.call(n),n.valueHasMutated=function(){n.notifySubscribers(t)},n.valueWillMutate=function(){n.notifySubscribers(t,"beforeChange")},o.utils.extend(n,o.observable.fn),o.exportProperty(n,"valueHasMutated",n.valueHasMutated),o.exportProperty(n,"valueWillMutate",n.valueWillMutate),n},o.observable.fn={equalityComparer:function(t,n){var r=t===null||typeof t in f;return r?t===n:!1}};var l=o.observable.protoProperty="__ko_proto__";o.observable.fn[l]=o.observable,o.hasPrototype=function(e,t){return e===null||e===r||e[l]===r?!1:e[l]===t?!0:o.hasPrototype(e[l],t)},o.isObservable=function(e){return o.hasPrototype(e,o.observable)},o.isWriteableObservable=function(e){return typeof e=="function"&&e[l]===o.observable?!0:typeof e=="function"&&e[l]===o.dependentObservable&&e.hasWriteFunction?!0:!1},o.exportSymbol("observable",o.observable),o.exportSymbol("isObservable",o.isObservable),o.exportSymbol("isWriteableObservable",o.isWriteableObservable),o.observableArray=function(e){arguments.length==0&&(e=[]);if(e===null||e===r||"length"in e){var t=o.observable(e);return o.utils.extend(t,o.observableArray.fn),t}throw new Error("The argument passed when initializing an observable array must be an array, or null, or undefined.")},o.observableArray.fn={remove:function(e){var t=this(),n=[],r=typeof e=="function"?e:function(t){return t===e};for(var i=0;i<t.length;i++){var s=t[i];r(s)&&(n.length===0&&this.valueWillMutate(),n.push(s),t.splice(i,1),i--)}return n.length&&this.valueHasMutated(),n},removeAll:function(e){if(e===r){var t=this(),n=t.slice(0);return this.valueWillMutate(),t.splice(0,t.length),this.valueHasMutated(),n}return e?this.remove(function(t){return o.utils.arrayIndexOf(e,t)>=0}):[]},destroy:function(e){var t=this(),n=typeof e=="function"?e:function(t){return t===e};this.valueWillMutate();for(var r=t.length-1;r>=0;r--){var i=t[r];n(i)&&(t[r]._destroy=!0)}this.valueHasMutated()},destroyAll:function(e){return e===r?this.destroy(function(){return!0}):e?this.destroy(function(t){return o.utils.arrayIndexOf(e,t)>=0}):[]},indexOf:function(e){var t=this();return o.utils.arrayIndexOf(t,e)},replace:function(e,t){var n=this.indexOf(e);n>=0&&(this.valueWillMutate(),this()[n]=t,this.valueHasMutated())}},o.utils.arrayForEach(["pop","push","reverse","shift","sort","splice","unshift"],function(e){o.observableArray.fn[e]=function(){var t=this();this.valueWillMutate();var n=t[e].apply(t,arguments);return this.valueHasMutated(),n}}),o.utils.arrayForEach(["slice"],function(e){o.observableArray.fn[e]=function(){var t=this();return t[e].apply(t,arguments)}}),o.exportSymbol("observableArray",o.observableArray),o.dependentObservable=function(e,t,n){function h(){o.utils.arrayForEach(c,function(e){e.dispose()}),c=[]}function y(){var e=w.throttleEvaluation;e&&e>=0?(clearTimeout(g),g=setTimeout(b,e)):b()}function b(){if(a)return;if(u&&v()){p();return}a=!0;try{var e=o.utils.arrayMap(c,function(e){return e.target});o.dependencyDetection.begin(function(t){var n;(n=o.utils.arrayIndexOf(e,t))>=0?e[n]=r:c.push(t.subscribe(y))});var n=f.call(t);for(var l=e.length-1;l>=0;l--)e[l]&&c.splice(l,1)[0].dispose();u=!0,w.notifySubscribers(s,"beforeChange"),s=n,i&&(w._latestValue=s)}finally{o.dependencyDetection.end()}w.notifySubscribers(s),a=!1}function w(){if(!(arguments.length>0))return S();E.apply(w,arguments)}function E(){if(typeof l!="function")throw new Error("Cannot write a value to a ko.computed unless you specify a 'write' option. If you wish to read the current value, don't pass any parameters.");l.apply(t,arguments)}function S(){return u||b(),o.dependencyDetection.registerDependency(w),s}var s,u=!1,a=!1,f=e;f&&typeof f=="object"?(n=f,f=n.read):(n=n||{},f||(f=n.read));if(typeof f!="function")throw new Error("Pass a function that returns the value of the ko.computed");var l=n.write;t||(t=n.owner);var c=[],p=h,d=typeof n["disposeWhenNodeIsRemoved"]=="object"?n.disposeWhenNodeIsRemoved:null,v=n.disposeWhen||function(){return!1};if(d){p=function(){o.utils.domNodeDisposal.removeDisposeCallback(d,arguments.callee),h()},o.utils.domNodeDisposal.addDisposeCallback(d,p);var m=v;v=function(){return!o.utils.domNodeIsAttachedToDocument(d)||m()}}var g=null;return w.getDependenciesCount=function(){return c.length},w.hasWriteFunction=typeof n.write=="function",w.dispose=function(){p()},o.subscribable.call(w),o.utils.extend(w,o.dependentObservable.fn),n.deferEvaluation!==!0&&b(),o.exportProperty(w,"dispose",w.dispose),o.exportProperty(w,"getDependenciesCount",w.getDependenciesCount),w},o.isComputed=function(e){return o.hasPrototype(e,o.dependentObservable)};var c=o.observable.protoProperty;o.dependentObservable[c]=o.observable,o.dependentObservable.fn={},o.dependentObservable.fn[c]=o.dependentObservable,o.exportSymbol("dependentObservable",o.dependentObservable),o.exportSymbol("computed",o.dependentObservable),o.exportSymbol("isComputed",o.isComputed),function(){function t(e,s,o){o=o||new i,e=s(e);var u=typeof e=="object"&&e!==null&&e!==r&&!(e instanceof Date);if(!u)return e;var a=e instanceof Array?[]:{};return o.save(e,a),n(e,function(n){var i=s(e[n]);switch(typeof i){case"boolean":case"number":case"string":case"function":a[n]=i;break;case"object":case"undefined":var u=o.get(i);a[n]=u!==r?u:t(i,s,o)}}),a}function n(e,t){if(e instanceof Array){for(var n=0;n<e.length;n++)t(n);typeof e["toJSON"]=="function"&&t("toJSON")}else for(var r in e)t(r)}function i(){var e=[],t=[];this.save=function(n,r){var i=o.utils.arrayIndexOf(e,n);i>=0?t[i]=r:(e.push(n),t.push(r))},this.get=function(n){var i=o.utils.arrayIndexOf(e,n);return i>=0?t[i]:r}}var e=10;o.toJS=function(n){if(arguments.length==0)throw new Error("When calling ko.toJS, pass the object you want to convert.");return t(n,function(t){for(var n=0;o.isObservable(t)&&n<e;n++)t=t();return t})},o.toJSON=function(e,t,n){var r=o.toJS(e);return o.utils.stringifyJson(r,t,n)}}(),o.exportSymbol("toJS",o.toJS),o.exportSymbol("toJSON",o.toJSON),function(){var e="__ko__hasDomDataOptionValue__";o.selectExtensions={readValue:function(t){switch(o.utils.tagNameLower(t)){case"option":if(t[e]===!0)return o.utils.domData.get(t,o.bindingHandlers.options.optionValueDomDataKey);return t.getAttribute("value");case"select":return t.selectedIndex>=0?o.selectExtensions.readValue(t.options[t.selectedIndex]):r;default:return t.value}},writeValue:function(t,n){switch(o.utils.tagNameLower(t)){case"option":switch(typeof n){case"string":o.utils.domData.set(t,o.bindingHandlers.options.optionValueDomDataKey,r),e in t&&delete t[e],t.value=n;break;default:o.utils.domData.set(t,o.bindingHandlers.options.optionValueDomDataKey,n),t[e]=!0,t.value=typeof n=="number"?n:""}break;case"select":for(var i=t.options.length-1;i>=0;i--)if(o.selectExtensions.readValue(t.options[i])==n){t.selectedIndex=i;break}break;default:if(n===null||n===r)n="";t.value=n}}}}(),o.exportSymbol("selectExtensions",o.selectExtensions),o.exportSymbol("selectExtensions.readValue",o.selectExtensions.readValue),o.exportSymbol("selectExtensions.writeValue",o.selectExtensions.writeValue),o.jsonExpressionRewriting=function(){function r(t,n){var r=null;while(t!=r)r=t,t=t.replace(e,function(e,t){return n[t]});return t}function i(e){return o.utils.arrayIndexOf(n,o.utils.stringTrim(e).toLowerCase())>=0?!1:e.match(t)!==null}function s(e){var t=o.utils.stringTrim(e);switch(t.length&&t.charAt(0)){case"'":case'"':return e;default:return"'"+t+"'"}}var e=/\@ko_token_(\d+)\@/g,t=/^[\_$a-z][\_$a-z0-9]*(\[.*?\])*(\.[\_$a-z][\_$a-z0-9]*(\[.*?\])*)*$/i,n=["true","false"];return{bindingRewriteValidators:[],parseObjectLiteral:function(e){var t=o.utils.stringTrim(e);if(t.length<3)return[];t.charAt(0)==="{"&&(t=t.substring(1,t.length-1));var n=[],i=null,s;for(var u=0;u<t.length;u++){var a=t.charAt(u);if(i===null)switch(a){case'"':case"'":case"/":i=u,s=a}else if(a==s&&t.charAt(u-1)!=="\\"){var f=t.substring(i,u+1);n.push(f);var l="@ko_token_"+(n.length-1)+"@";t=t.substring(0,i)+l+t.substring(u+1),u-=f.length-l.length,i=null}}i=null,s=null;var c=0,h=null;for(var u=0;u<t.length;u++){var a=t.charAt(u);if(i===null)switch(a){case"{":i=u,h=a,s="}";break;case"(":i=u,h=a,s=")";break;case"[":i=u,h=a,s="]"}if(a===h)c++;else if(a===s){c--;if(c===0){var f=t.substring(i,u+1);n.push(f);var l="@ko_token_"+(n.length-1)+"@";t=t.substring(0,i)+l+t.substring(u+1),u-=f.length-l.length,i=null}}}var p=[],d=t.split(",");for(var v=0,m=d.length;v<m;v++){var g=d[v],y=g.indexOf(":");if(y>0&&y<g.length-1){var b=g.substring(0,y),w=g.substring(y+1);p.push({key:r(b,n),value:r(w,n)})}else p.push({unknown:r(g,n)})}return p},insertPropertyAccessorsIntoJson:function(e){var t=typeof e=="string"?o.jsonExpressionRewriting.parseObjectLiteral(e):e,n=[],r=[],u;for(var a=0;u=t[a];a++){n.length>0&&n.push(",");if(u.key){var f=s(u.key),l=u.value;n.push(f),n.push(":"),n.push(l),i(o.utils.stringTrim(l))&&(r.length>0&&r.push(", "),r.push(f+" : function(__ko_value) { "+l+" = __ko_value; }"))}else u.unknown&&n.push(u.unknown)}var c=n.join("");if(r.length>0){var h=r.join("");c=c+", '_ko_property_writers' : { "+h+" } "}return c},keyValueArrayContainsKey:function(e,t){for(var n=0;n<e.length;n++)if(o.utils.stringTrim(e[n]["key"])==t)return!0;return!1},writeValueToProperty:function(e,t,n,r,i){if(!e||!o.isWriteableObservable(e)){var s=t()._ko_property_writers;s&&s[n]&&s[n](r)}else(!i||e()!==r)&&e(r)}}}(),o.exportSymbol("jsonExpressionRewriting",o.jsonExpressionRewriting),o.exportSymbol("jsonExpressionRewriting.bindingRewriteValidators",o.jsonExpressionRewriting.bindingRewriteValidators),o.exportSymbol("jsonExpressionRewriting.parseObjectLiteral",o.jsonExpressionRewriting.parseObjectLiteral),o.exportSymbol("jsonExpressionRewriting.insertPropertyAccessorsIntoJson",o.jsonExpressionRewriting.insertPropertyAccessorsIntoJson),function(){function s(t){return t.nodeType==8&&(e?t.text:t.nodeValue).match(n)}function u(t){return t.nodeType==8&&(e?t.text:t.nodeValue).match(r)}function a(e,t){var n=e,r=1,i=[];while(n=n.nextSibling){if(u(n)){r--;if(r===0)return i}i.push(n),s(n)&&r++}if(!t)throw new Error("Cannot find closing comment tag to match: "+e.nodeValue);return null}function f(e,t){var n=a(e,t);return n?n.length>0?n[n.length-1].nextSibling:e.nextSibling:null}function l(e){var t=e.firstChild,n=null;if(t)do if(n)n.push(t);else if(s(t)){var r=f(t,!0);r?t=r:n=[t]}else u(t)&&(n=[t]);while(t=t.nextSibling);return n}var e=t.createComment("test").text==="<!--test-->",n=e?/^<!--\s*ko\s+(.*\:.*)\s*-->$/:/^\s*ko\s+(.*\:.*)\s*$/,r=e?/^<!--\s*\/ko\s*-->$/:/^\s*\/ko\s*$/,i={ul:!0,ol:!0};o.virtualElements={allowedBindings:{},childNodes:function(e){return s(e)?a(e):e.childNodes},emptyNode:function(e){if(!s(e))o.utils.emptyDomNode(e);else{var t=o.virtualElements.childNodes(e);for(var n=0,r=t.length;n<r;n++)o.removeNode(t[n])}},setDomNodeChildren:function(e,t){if(!s(e))o.utils.setDomNodeChildren(e,t);else{o.virtualElements.emptyNode(e);var n=e.nextSibling;for(var r=0,i=t.length;r<i;r++)n.parentNode.insertBefore(t[r],n)}},prepend:function(e,t){s(e)?e.parentNode.insertBefore(t,e.nextSibling):e.firstChild?e.insertBefore(t,e.firstChild):e.appendChild(t)},insertAfter:function(e,t,n){s(e)?e.parentNode.insertBefore(t,n.nextSibling):n.nextSibling?e.insertBefore(t,n.nextSibling):e.appendChild(t)},firstChild:function(e){return s(e)?!e.nextSibling||u(e.nextSibling)?null:e.nextSibling:e.firstChild},nextSibling:function(e){return s(e)&&(e=f(e)),e.nextSibling&&u(e.nextSibling)?null:e.nextSibling},virtualNodeBindingValue:function(e){var t=s(e);return t?t[1]:null},normaliseVirtualElementDomStructure:function(e){if(!i[o.utils.tagNameLower(e)])return;var t=e.firstChild;if(t)do if(t.nodeType===1){var n=l(t);if(n){var r=t.nextSibling;for(var s=0;s<n.length;s++)r?e.insertBefore(n[s],r):e.appendChild(n[s])}}while(t=t.nextSibling)}}}(),o.exportSymbol("virtualElements",o.virtualElements),o.exportSymbol("virtualElements.allowedBindings",o.virtualElements.allowedBindings),o.exportSymbol("virtualElements.emptyNode",o.virtualElements.emptyNode),o.exportSymbol("virtualElements.insertAfter",o.virtualElements.insertAfter),o.exportSymbol("virtualElements.prepend",o.virtualElements.prepend),o.exportSymbol("virtualElements.setDomNodeChildren",o.virtualElements.setDomNodeChildren),function(){function t(e,t,r){var i=t+"_"+e;return r[i]||(r[i]=n(e,t))}function n(e,t){var n=" { "+o.jsonExpressionRewriting.insertPropertyAccessorsIntoJson(e)+" } ";return o.utils.buildEvalWithinScopeFunction(n,t)}var e="data-bind";o.bindingProvider=function(){this.bindingCache={}},o.utils.extend(o.bindingProvider.prototype,{nodeHasBindings:function(t){switch(t.nodeType){case 1:return t.getAttribute(e)!=null;case 8:return o.virtualElements.virtualNodeBindingValue(t)!=null;default:return!1}},getBindings:function(e,t){var n=this.getBindingsString(e,t);return n?this.parseBindingsString(n,t):null},getBindingsString:function(t,n){switch(t.nodeType){case 1:return t.getAttribute(e);case 8:return o.virtualElements.virtualNodeBindingValue(t);default:return null}},parseBindingsString:function(e,n){try{var r=n.$data,i=typeof r=="object"&&r!=null?[r,n]:[n],s=t(e,i.length,this.bindingCache);return s(i)}catch(o){throw new Error("Unable to parse bindings.\nMessage: "+o+";\nBindings value: "+e)}}}),o.bindingProvider.instance=new o.bindingProvider}(),o.exportSymbol("bindingProvider",o.bindingProvider),function(){function t(e){var t=o.virtualElements.allowedBindings[e];if(!t)throw new Error("The binding '"+e+"' cannot be used with virtual elements")}function n(e,t,n){var r,s=o.virtualElements.firstChild(t);while(r=s)s=o.virtualElements.nextSibling(r),i(e,r,n)}function i(e,t,r){var i=!0,u=t.nodeType===1;u&&o.virtualElements.normaliseVirtualElementDomStructure(t);var a=u&&r||o.bindingProvider.instance.nodeHasBindings(t);a&&(i=s(t,null,e,r).shouldBindDescendants),i&&n(e,t,!u)}function s(e,n,i,s){function f(e){return function(){return a[e]}}function l(){return a}var u=0,a,c;return o.dependentObservable(function(){var h=i&&i instanceof o.bindingContext?i:new o.bindingContext(o.utils.unwrapObservable(i)),p=h.$data;s&&o.storedBindingContextForNode(e,h);var d=typeof n=="function"?n():n;a=d||o.bindingProvider.instance.getBindings(e,h);if(a){if(u===0){u=1;for(var v in a){var m=o.bindingHandlers[v];m&&e.nodeType===8&&t(v);if(m&&typeof m["init"]=="function"){var g=m.init,y=g(e,f(v),l,p,h);if(y&&y.controlsDescendantBindings){if(c!==r)throw new Error("Multiple bindings ("+c+" and "+v+") are trying to control descendant bindings of the same element. You cannot use these bindings together on the same element.");c=v}}}u=2}if(u===2)for(var v in a){var m=o.bindingHandlers[v];if(m&&typeof m["update"]=="function"){var b=m.update;b(e,f(v),l,p,h)}}}},null,{disposeWhenNodeIsRemoved:e}),{shouldBindDescendants:c===r}}o.bindingHandlers={},o.bindingContext=function(e,t){t?(o.utils.extend(this,t),this.$parentContext=t,this.$parent=t.$data,this.$parents=(t.$parents||[]).slice(0),this.$parents.unshift(this.$parent)):(this.$parents=[],this.$root=e),this.$data=e},o.bindingContext.prototype.createChildContext=function(e){return new o.bindingContext(e,this)},o.bindingContext.prototype.extend=function(e){var t=o.utils.extend(new o.bindingContext,this);return o.utils.extend(t,e)};var u="__ko_bindingContext__";o.storedBindingContextForNode=function(e,t){if(arguments.length!=2)return o.utils.domData.get(e,u);o.utils.domData.set(e,u,t)},o.applyBindingsToNode=function(e,t,n){return e.nodeType===1&&o.virtualElements.normaliseVirtualElementDomStructure(e),s(e,t,n,!0)},o.applyBindingsToDescendants=function(e,t){(t.nodeType===1||t.nodeType===8)&&n(e,t,!0)},o.applyBindings=function(t,n){if(n&&n.nodeType!==1&&n.nodeType!==8)throw new Error("ko.applyBindings: first parameter should be your view model; second parameter should be a DOM node");n=n||e.document.body,i(t,n,!0)},o.contextFor=function(e){switch(e.nodeType){case 1:case 8:var t=o.storedBindingContextForNode(e);if(t)return t;if(e.parentNode)return o.contextFor(e.parentNode)}return r},o.dataFor=function(e){var t=o.contextFor(e);return t?t.$data:r},o.exportSymbol("bindingHandlers",o.bindingHandlers),o.exportSymbol("applyBindings",o.applyBindings),o.exportSymbol("applyBindingsToDescendants",o.applyBindingsToDescendants),o.exportSymbol("applyBindingsToNode",o.applyBindingsToNode),o.exportSymbol("contextFor",o.contextFor),o.exportSymbol("dataFor",o.dataFor)}();var h=["click"];o.utils.arrayForEach(h,function(e){o.bindingHandlers[e]={init:function(t,n,r,i){var s=function(){var t={};return t[e]=n(),t};return o.bindingHandlers.event.init.call(this,t,s,r,i)}}}),o.bindingHandlers.event={init:function(e,t,n,r){var i=t()||{};for(var s in i)(function(){var i=s;typeof i=="string"&&o.utils.registerEventHandler(e,i,function(e){var s,u=t()[i];if(!u)return;var a=n();try{var f=o.utils.makeArray(arguments);f.unshift(r),s=u.apply(r,f)}finally{s!==!0&&(e.preventDefault?e.preventDefault():e.returnValue=!1)}var l=a[i+"Bubble"]!==!1;l||(e.cancelBubble=!0,e.stopPropagation&&e.stopPropagation())})})()}},o.bindingHandlers.submit={init:function(e,t,n,r){if(typeof t()!="function")throw new Error("The value for a submit binding must be a function");o.utils.registerEventHandler(e,"submit",function(n){var i,s=t();try{i=s.call(r,e)}finally{i!==!0&&(n.preventDefault?n.preventDefault():n.returnValue=!1)}})}},o.bindingHandlers.visible={update:function(e,t){var n=o.utils.unwrapObservable(t()),r=e.style.display!="none";n&&!r?e.style.display="":!n&&r&&(e.style.display="none")}},o.bindingHandlers.enable={update:function(e,t){var n=o.utils.unwrapObservable(t());n&&e.disabled?e.removeAttribute("disabled"):!n&&!e.disabled&&(e.disabled=!0)}},o.bindingHandlers.disable={update:function(e,t){o.bindingHandlers.enable.update(e,function(){return!o.utils.unwrapObservable(t())})}},o.bindingHandlers.value={init:function(e,t,n){var r=["change"],i=n().valueUpdate;i&&(typeof i=="string"&&(i=[i]),o.utils.arrayPushAll(r,i),r=o.utils.arrayGetDistinctValues(r));var s=function(){var r=t(),i=o.selectExtensions.readValue(e);o.jsonExpressionRewriting.writeValueToProperty(r,n,"value",i,!0)},u=o.utils.ieVersion&&e.tagName.toLowerCase()=="input"&&e.type=="text"&&e.autocomplete!="off"&&(!e.form||e.form.autocomplete!="off");if(u&&o.utils.arrayIndexOf(r,"propertychange")==-1){var a=!1;o.utils.registerEventHandler(e,"propertychange",function(){a=!0}),o.utils.registerEventHandler(e,"blur",function(){a&&(a=!1,s())})}o.utils.arrayForEach(r,function(t){var n=s;o.utils.stringStartsWith(t,"after")&&(n=function(){setTimeout(s,0)},t=t.substring("after".length)),o.utils.registerEventHandler(e,t,n)})},update:function(e,t){var n=o.utils.tagNameLower(e)==="select",r=o.utils.unwrapObservable(t()),i=o.selectExtensions.readValue(e),s=r!=i;r===0&&i!==0&&i!=="0"&&(s=!0);if(s){var u=function(){o.selectExtensions.writeValue(e,r)};u();var a=n;a&&setTimeout(u,0)}n&&e.length>0&&p(e,r,!1)}},o.bindingHandlers.options={update:function(e,n,i){if(o.utils.tagNameLower(e)!=="select")throw new Error("options binding applies only to SELECT elements");var s=e.length==0,u=o.utils.arrayMap(o.utils.arrayFilter(e.childNodes,function(e){return e.tagName&&o.utils.tagNameLower(e)==="option"&&e.selected}),function(e){return o.selectExtensions.readValue(e)||e.innerText||e.textContent}),a=e.scrollTop,f=o.utils.unwrapObservable(n()),l=e.value;while(e.length>0)o.cleanNode(e.options[0]),e.remove(0);if(f){var c=i();typeof f.length!="number"&&(f=[f]);if(c.optionsCaption){var h=t.createElement("option");o.utils.setHtml(h,c.optionsCaption),o.selectExtensions.writeValue(h,r),e.appendChild(h)}for(var d=0,v=f.length;d<v;d++){var h=t.createElement("option"),m=typeof c["optionsValue"]=="string"?f[d][c.optionsValue]:f[d];m=o.utils.unwrapObservable(m),o.selectExtensions.writeValue(h,m);var g=c.optionsText,y;typeof g=="function"?y=g(f[d]):typeof g=="string"?y=f[d][g]:y=m;if(y===null||y===r)y="";o.utils.setTextContent(h,y),e.appendChild(h)}var b=e.getElementsByTagName("option"),w=0;for(var d=0,v=b.length;d<v;d++)o.utils.arrayIndexOf(u,o.selectExtensions.readValue(b[d]))>=0&&(o.utils.setOptionNodeSelectionState(b[d],!0),w++);e.scrollTop=a,s&&"value"in c&&p(e,o.utils.unwrapObservable(c.value),!0),o.utils.ensureSelectElementIsRenderedCorrectly(e)}}},o.bindingHandlers.options.optionValueDomDataKey="__ko.optionValueDomData__",o.bindingHandlers.selectedOptions={getSelectedValuesFromSelectNode:function(e){var t=[],n=e.childNodes;for(var r=0,i=n.length;r<i;r++){var s=n[r],u=o.utils.tagNameLower(s);if(u=="option"&&s.selected)t.push(o.selectExtensions.readValue(s));else if(u=="optgroup"){var a=o.bindingHandlers.selectedOptions.getSelectedValuesFromSelectNode(s);Array.prototype.splice.apply(t,[t.length,0].concat(a))}}return t},init:function(e,t,n){o.utils.registerEventHandler(e,"change",function(){var e=t(),r=o.bindingHandlers.selectedOptions.getSelectedValuesFromSelectNode(this);o.jsonExpressionRewriting.writeValueToProperty(e,n,"value",r)})},update:function(e,t){if(o.utils.tagNameLower(e)!="select")throw new Error("values binding applies only to SELECT elements");var n=o.utils.unwrapObservable(t());if(n&&typeof n.length=="number"){var r=e.childNodes;for(var i=0,s=r.length;i<s;i++){var u=r[i];o.utils.tagNameLower(u)==="option"&&o.utils.setOptionNodeSelectionState(u,o.utils.arrayIndexOf(n,o.selectExtensions.readValue(u))>=0)}}}},o.bindingHandlers.text={update:function(e,t){o.utils.setTextContent(e,t())}},o.bindingHandlers.html={init:function(){return{controlsDescendantBindings:!0}},update:function(e,t){var n=o.utils.unwrapObservable(t());o.utils.setHtml(e,n)}},o.bindingHandlers.css={update:function(e,t){var n=o.utils.unwrapObservable(t()||{});for(var r in n)if(typeof r=="string"){var i=o.utils.unwrapObservable(n[r]);o.utils.toggleDomNodeCssClass(e,r,i)}}},o.bindingHandlers.style={update:function(e,t){var n=o.utils.unwrapObservable(t()||{});for(var r in n)if(typeof r=="string"){var i=o.utils.unwrapObservable(n[r]);e.style[r]=i||""}}},o.bindingHandlers.uniqueName={init:function(e,n){n()&&(e.name="ko_unique_"+ ++o.bindingHandlers.uniqueName.currentIndex,(o.utils.isIe6||o.utils.isIe7)&&e.mergeAttributes(t.createElement("<input name='"+e.name+"'/>"),!1))}},o.bindingHandlers.uniqueName.currentIndex=0,o.bindingHandlers.checked={init:function(e,t,n){var r=function(){var r;if(e.type=="checkbox")r=e.checked;else{if(e.type!="radio"||!e.checked)return;r=e.value}var i=t();if(e.type=="checkbox"&&o.utils.unwrapObservable(i)instanceof Array){var s=o.utils.arrayIndexOf(o.utils.unwrapObservable(i),e.value);e.checked&&s<0?i.push(e.value):!e.checked&&s>=0&&i.splice(s,1)}else o.jsonExpressionRewriting.writeValueToProperty(i,n,"checked",r,!0)};o.utils.registerEventHandler(e,"click",r),e.type=="radio"&&!e.name&&o.bindingHandlers.uniqueName.init(e,function(){return!0})},update:function(e,t){var n=o.utils.unwrapObservable(t());e.type=="checkbox"?n instanceof Array?e.checked=o.utils.arrayIndexOf(n,e.value)>=0:e.checked=n:e.type=="radio"&&(e.checked=e.value==n)}};var d={"class":"className","for":"htmlFor"};o.bindingHandlers.attr={update:function(e,t,n){var i=o.utils.unwrapObservable(t())||{};for(var s in i)if(typeof s=="string"){var u=o.utils.unwrapObservable(i[s]),a=u===!1||u===null||u===r;a&&e.removeAttribute(s),o.utils.ieVersion<=8&&s in d?(s=d[s],a?e.removeAttribute(s):e[s]=u):a||e.setAttribute(s,u.toString())}}},o.bindingHandlers.hasfocus={init:function(e,t,n){var r=function(e){var r=t();o.jsonExpressionRewriting.writeValueToProperty(r,n,"hasfocus",e,!0)};o.utils.registerEventHandler(e,"focus",function(){r(!0)}),o.utils.registerEventHandler(e,"focusin",function(){r(!0)}),o.utils.registerEventHandler(e,"blur",function(){r(!1)}),o.utils.registerEventHandler(e,"focusout",function(){r(!1)})},update:function(e,t){var n=o.utils.unwrapObservable(t());n?e.focus():e.blur(),o.utils.triggerEvent(e,n?"focusin":"focusout")}},o.bindingHandlers["with"]={makeTemplateValueAccessor:function(e){return function(){var t=e();return{"if":t,data:t,templateEngine:o.nativeTemplateEngine.instance}}},init:function(e,t,n,r,i){return o.bindingHandlers.template.init(e,o.bindingHandlers["with"].makeTemplateValueAccessor(t))},update:function(e,t,n,r,i){return o.bindingHandlers.template.update(e,o.bindingHandlers["with"].makeTemplateValueAccessor(t),n,r,i)}},o.jsonExpressionRewriting.bindingRewriteValidators["with"]=!1,o.virtualElements.allowedBindings["with"]=!0,o.bindingHandlers["if"]={makeTemplateValueAccessor:function(e){return function(){return{"if":e(),templateEngine:o.nativeTemplateEngine.instance}}},init:function(e,t,n,r,i){return o.bindingHandlers.template.init(e,o.bindingHandlers["if"].makeTemplateValueAccessor(t))},update:function(e,t,n,r,i){return o.bindingHandlers.template.update(e,o.bindingHandlers["if"].makeTemplateValueAccessor(t),n,r,i)}},o.jsonExpressionRewriting.bindingRewriteValidators["if"]=!1,o.virtualElements.allowedBindings["if"]=!0,o.bindingHandlers.ifnot={makeTemplateValueAccessor:function(e){return function(){return{ifnot:e(),templateEngine:o.nativeTemplateEngine.instance}}},init:function(e,t,n,r,i){return o.bindingHandlers.template.init(e,o.bindingHandlers.ifnot.makeTemplateValueAccessor(t))},update:function(e,t,n,r,i){return o.bindingHandlers.template.update(e,o.bindingHandlers.ifnot.makeTemplateValueAccessor(t),n,r,i)}},o.jsonExpressionRewriting.bindingRewriteValidators.ifnot=!1,o.virtualElements.allowedBindings.ifnot=!0,o.bindingHandlers.foreach={makeTemplateValueAccessor:function(e){return function(){var t=o.utils.unwrapObservable(e());return!t||typeof t.length=="number"?{foreach:t,templateEngine:o.nativeTemplateEngine.instance}:{foreach:t.data,includeDestroyed:t.includeDestroyed,afterAdd:t.afterAdd,beforeRemove:t.beforeRemove,afterRender:t.afterRender,templateEngine:o.nativeTemplateEngine.instance}}},init:function(e,t,n,r,i){return o.bindingHandlers.template.init(e,o.bindingHandlers.foreach.makeTemplateValueAccessor(t))},update:function(e,t,n,r,i){return o.bindingHandlers.template.update(e,o.bindingHandlers.foreach.makeTemplateValueAccessor(t),n,r,i)}},o.jsonExpressionRewriting.bindingRewriteValidators.foreach=!1,o.virtualElements.allowedBindings.foreach=!0,o.templateEngine=function(){},o.templateEngine.prototype.renderTemplateSource=function(e,t,n){throw new Error("Override renderTemplateSource")},o.templateEngine.prototype.createJavaScriptEvaluatorBlock=function(e){throw new Error("Override createJavaScriptEvaluatorBlock")},o.templateEngine.prototype.makeTemplateSource=function(e,n){if(typeof e=="string"){n=n||t;var r=n.getElementById(e);if(!r)throw new Error("Cannot find template with ID "+e);return new o.templateSources.domElement(r)}if(e.nodeType==1||e.nodeType==8)return new o.templateSources.anonymousTemplate(e);throw new Error("Unknown template type: "+e)},o.templateEngine.prototype.renderTemplate=function(e,t,n,r){var i=this.makeTemplateSource(e,r);return this.renderTemplateSource(i,t,n)},o.templateEngine.prototype.isTemplateRewritten=function(e,n){if(this.allowTemplateRewriting===!1)return!0;var r=n&&n!=t;return!r&&this.knownRewrittenTemplates&&this.knownRewrittenTemplates[e]?!0:this.makeTemplateSource(e,n).data("isRewritten")},o.templateEngine.prototype.rewriteTemplate=function(e,n,r){var i=this.makeTemplateSource(e,r),s=n(i.text());i.text(s),i.data("isRewritten",!0);var o=r&&r!=t;!o&&typeof e=="string"&&(this.knownRewrittenTemplates=this.knownRewrittenTemplates||{},this.knownRewrittenTemplates[e]=!0)},o.exportSymbol("templateEngine",o.templateEngine),o.templateRewriting=function(){function n(e){var t=o.jsonExpressionRewriting.bindingRewriteValidators;for(var n=0;n<e.length;n++){var r=e[n].key;if(t.hasOwnProperty(r)){var i=t[r];if(typeof i=="function"){var s=i(e[n].value);if(s)throw new Error(s)}else if(!i)throw new Error("This template engine does not support the '"+r+"' binding within its templates")}}}function r(e,t,r){var i=o.jsonExpressionRewriting.parseObjectLiteral(e);n(i);var s=o.jsonExpressionRewriting.insertPropertyAccessorsIntoJson(i),u="ko.templateRewriting.applyMemoizedBindingsToNextSibling(function() {             return (function() { return { "+s+" } })()         })";return r.createJavaScriptEvaluatorBlock(u)+t}var e=/(<[a-z]+\d*(\s+(?!data-bind=)[a-z0-9\-]+(=(\"[^\"]*\"|\'[^\']*\'))?)*\s+)data-bind=(["'])([\s\S]*?)\5/gi,t=/<!--\s*ko\b\s*([\s\S]*?)\s*-->/g;return{ensureTemplateIsRewritten:function(e,t,n){t.isTemplateRewritten(e,n)||t.rewriteTemplate(e,function(e){return o.templateRewriting.memoizeBindingAttributeSyntax(e,t)},n)},memoizeBindingAttributeSyntax:function(n,i){return n.replace(e,function(){return r(arguments[6],arguments[1],i)}).replace(t,function(){return r(arguments[1],"<!-- ko -->",i)})},applyMemoizedBindingsToNextSibling:function(e){return o.memoization.memoize(function(t,n){t.nextSibling&&o.applyBindingsToNode(t.nextSibling,e,n)})}}}(),o.exportSymbol("templateRewriting",o.templateRewriting),o.exportSymbol("templateRewriting.applyMemoizedBindingsToNextSibling",o.templateRewriting.applyMemoizedBindingsToNextSibling),function(){o.templateSources={},o.templateSources.domElement=function(e){this.domElement=e},o.templateSources.domElement.prototype.text=function(){var e=o.utils.tagNameLower(this.domElement),t=e==="script"?"text":e==="textarea"?"value":"innerHTML";if(arguments.length==0)return this.domElement[t];var n=arguments[0];t==="innerHTML"?o.utils.setHtml(this.domElement,n):this.domElement[t]=n},o.templateSources.domElement.prototype.data=function(e){if(arguments.length===1)return o.utils.domData.get(this.domElement,"templateSourceData_"+e);o.utils.domData.set(this.domElement,"templateSourceData_"+e,arguments[1])};var e="__ko_anon_template__";o.templateSources.anonymousTemplate=function(e){this.domElement=e},o.templateSources.anonymousTemplate.prototype=new o.templateSources.domElement,o.templateSources.anonymousTemplate.prototype.text=function(){if(arguments.length==0){var t=o.utils.domData.get(this.domElement,e)||{};return t.textData===r&&t.containerData&&(t.textData=t.containerData.innerHTML),t.textData}var n=arguments[0];o.utils.domData.set(this.domElement,e,{textData:n})},o.templateSources.domElement.prototype.nodes=function(){if(arguments.length==0){var t=o.utils.domData.get(this.domElement,e)||{};return t.containerData}var n=arguments[0];o.utils.domData.set(this.domElement,e,{containerData:n})},o.exportSymbol("templateSources",o.templateSources),o.exportSymbol("templateSources.domElement",o.templateSources.domElement),o.exportSymbol("templateSources.anonymousTemplate",o.templateSources.anonymousTemplate)}(),function(){function t(e,t,n){var r,i=e,s=o.virtualElements.nextSibling(t);while(i&&(r=i)!==s)i=o.virtualElements.nextSibling(r),(r.nodeType===1||r.nodeType===8)&&n(r)}function n(e,n){if(e.length){var r=e[0],i=e[e.length-1];t(r,i,function(e){o.applyBindings(n,e)}),t(r,i,function(e){o.memoization.unmemoizeDomNodeAndDescendants(e,[n])})}}function i(e){return e.nodeType?e:e.length>0?e[0]:null}function s(t,r,s,u,a){a=a||{};var f=t&&i(t),l=f&&f.ownerDocument,c=a.templateEngine||e;o.templateRewriting.ensureTemplateIsRewritten(s,c,l);var h=c.renderTemplate(s,u,a,l);if(typeof h.length!="number"||h.length>0&&typeof h[0].nodeType!="number")throw new Error("Template engine must return an array of DOM nodes");var p=!1;switch(r){case"replaceChildren":o.virtualElements.setDomNodeChildren(t,h),p=!0;break;case"replaceNode":o.utils.replaceDomNodes(t,h),p=!0;break;case"ignoreTargetNode":break;default:throw new Error("Unknown renderMode: "+r)}return p&&(n(h,u),a.afterRender&&a.afterRender(h,u.$data)),h}function a(e,t){var n=o.utils.domData.get(e,u);n&&typeof n.dispose=="function"&&n.dispose(),o.utils.domData.set(e,u,t)}var e;o.setTemplateEngine=function(t){if(!(t==r||t instanceof o.templateEngine))throw new Error("templateEngine must inherit from ko.templateEngine");e=t},o.renderTemplate=function(t,n,u,a,f){u=u||{};if((u["templateEngine"]||e)==r)throw new Error("Set a template engine before calling renderTemplate");f=f||"replaceChildren";if(a){var l=i(a),c=function(){return!l||!o.utils.domNodeIsAttachedToDocument(l)},h=l&&f=="replaceNode"?l.parentNode:l;return o.dependentObservable(function(){var e=n&&n instanceof o.bindingContext?n:new o.bindingContext(o.utils.unwrapObservable(n)),r=typeof t=="function"?t(e.$data):t,c=s(a,f,r,e,u);f=="replaceNode"&&(a=c,l=i(a))},null,{disposeWhen:c,disposeWhenNodeIsRemoved:h})}return o.memoization.memoize(function(e){o.renderTemplate(t,n,u,e,"replaceNode")})},o.renderTemplateForEach=function(e,t,i,u,a){var f,l=function(t,n){var r=typeof e=="function"?e(t):e;return f=a.createChildContext(o.utils.unwrapObservable(t)),f.$index=n,s(null,"ignoreTargetNode",r,f,i)},c=function(e,t,r){n(t,f),i.afterRender&&i.afterRender(t,e)};return o.dependentObservable(function(){var e=o.utils.unwrapObservable(t)||[];typeof e.length=="undefined"&&(e=[e]);var n=o.utils.arrayFilter(e,function(e){return i.includeDestroyed||e===r||e===null||!o.utils.unwrapObservable(e._destroy)});o.utils.setDomNodeChildrenFromArrayMapping(u,n,l,i,c)},null,{disposeWhenNodeIsRemoved:u})};var u="__ko__templateSubscriptionDomDataKey__";o.bindingHandlers.template={init:function(e,t){var n=o.utils.unwrapObservable(t());if(typeof n!="string"&&!n.name&&(e.nodeType==1||e.nodeType==8)){var r=e.nodeType==1?e.childNodes:o.virtualElements.childNodes(e),i=o.utils.moveCleanedNodesToContainerElement(r);(new o.templateSources.anonymousTemplate(e)).nodes(i)}return{controlsDescendantBindings:!0}},update:function(e,t,n,r,i){var s=o.utils.unwrapObservable(t()),u,f=!0;typeof s=="string"?u=s:(u=s.name,"if"in s&&(f=f&&o.utils.unwrapObservable(s["if"])),"ifnot"in s&&(f=f&&!o.utils.unwrapObservable(s.ifnot)));var l=null;if(typeof s=="object"&&"foreach"in s){var c=f&&s.foreach||[];l=o.renderTemplateForEach(u||e,c,s,e,i)}else if(f){var h=typeof s=="object"&&"data"in s?i.createChildContext(o.utils.unwrapObservable(s.data)):i;l=o.renderTemplate(u||e,h,s,e)}else o.virtualElements.emptyNode(e);a(e,l)}},o.jsonExpressionRewriting.bindingRewriteValidators.template=function(e){var t=o.jsonExpressionRewriting.parseObjectLiteral(e);return t.length==1&&t[0].unknown?null:o.jsonExpressionRewriting.keyValueArrayContainsKey(t,"name")?null:"This template engine does not support anonymous templates nested within its templates"},o.virtualElements.allowedBindings.template=!0}(),o.exportSymbol("setTemplateEngine",o.setTemplateEngine),o.exportSymbol("renderTemplate",o.renderTemplate),function(){function e(e,t,n){var i=[];for(var s=0;s<=t.length;s++)i[s]=[];for(var s=0,o=Math.min(e.length,n);s<=o;s++)i[0][s]=s;for(var s=1,o=Math.min(t.length,n);s<=o;s++)i[s][0]=s;var u,a=e.length,f,l=t.length,c,h;for(u=1;u<=a;u++){var p=Math.max(1,u-n),d=Math.min(l,u+n);for(f=p;f<=d;f++)if(e[u-1]===t[f-1])i[f][u]=i[f-1][u-1];else{var v=i[f-1][u]===r?Number.MAX_VALUE:i[f-1][u]+1,m=i[f][u-1]===r?Number.MAX_VALUE:i[f][u-1]+1;i[f][u]=Math.min(v,m)}}return i}function t(e,t,n){var i=t.length,s=n.length,o=[],u=e[s][i];if(u===r)return null;while(i>0||s>0){var a=e[s][i],f=s>0?e[s-1][i]:u+1,l=i>0?e[s][i-1]:u+1,c=s>0&&i>0?e[s-1][i-1]:u+1;if(f===r||f<a-1)f=u+1;if(l===r||l<a-1)l=u+1;c<a-1&&(c=u+1),f<=l&&f<c?(o.push({status:"added",value:n[s-1]}),s--):l<f&&l<c?(o.push({status:"deleted",value:t[i-1]}),i--):(o.push({status:"retained",value:t[i-1]}),s--,i--)}return o.reverse()}o.utils.compareArrays=function(n,i,s){if(s===r)return o.utils.compareArrays(n,i,1)||o.utils.compareArrays(n,i,10)||o.utils.compareArrays(n,i,Number.MAX_VALUE);n=n||[],i=i||[];var u=e(n,i,s);return t(u,n,i)}}(),o.exportSymbol("utils.compareArrays",o.utils.compareArrays),function(){function e(e){if(e.length>2){var t=e[0],n=e[e.length-1],r=[t];while(t!==n){t=t.nextSibling;if(!t)return;r.push(t)}Array.prototype.splice.apply(e,[0,e.length].concat(r))}}function t(t,n,r,i,s){var u=[],a=o.dependentObservable(function(){var t=n(r,s)||[];u.length>0&&(e(u),o.utils.replaceDomNodes(u,t),i&&i(r,t)),u.splice(0,u.length),o.utils.arrayPushAll(u,t)},null,{disposeWhenNodeIsRemoved:t,disposeWhen:function(){return u.length==0||!o.utils.domNodeIsAttachedToDocument(u[0])}});return{mappedNodes:u,dependentObservable:a}}var n="setDomNodeChildrenFromArrayMapping_lastMappingResult";o.utils.setDomNodeChildrenFromArrayMapping=function(i,s,u,a,f){s=s||[],a=a||{};var l=o.utils.domData.get(i,n)===r,c=o.utils.domData.get(i,n)||[],h=o.utils.arrayMap(c,function(e){return e.arrayEntry}),p=o.utils.compareArrays(h,s),d=[],v=0,m=[],g=0,y=[],b=null;for(var w=0,E=p.length;w<E;w++)switch(p[w].status){case"retained":var S=c[v];S.indexObservable(g),g=d.push(S),S.domNodes.length>0&&(b=S.domNodes[S.domNodes.length-1]),v++;break;case"deleted":c[v].dependentObservable.dispose(),e(c[v].domNodes),o.utils.arrayForEach(c[v].domNodes,function(e){m.push({element:e,index:w,value:p[w].value}),b=e}),v++;break;case"added":var x=p[w].value,T=o.observable(g),N=t(i,u,x,f,T),C=N.mappedNodes;g=d.push({arrayEntry:p[w].value,domNodes:C,dependentObservable:N.dependentObservable,indexObservable:T});for(var k=0,L=C.length;k<L;k++){var A=C[k];y.push({element:A,index:w,value:p[w].value}),b==null?o.virtualElements.prepend(i,A):o.virtualElements.insertAfter(i,A,b),b=A}f&&f(x,C,T)}o.utils.arrayForEach(m,function(e){o.cleanNode(e.element)});var O=!1;if(!l){if(a.afterAdd)for(var w=0;w<y.length;w++)a.afterAdd(y[w].element,y[w].index,y[w].value);if(a.beforeRemove){for(var w=0;w<m.length;w++)a.beforeRemove(m[w].element,m[w].index,m[w].value);O=!0}}if(!O&&m.length)for(var w=0;w<m.length;w++){var M=m[w].element;M.parentNode&&M.parentNode.removeChild(M)}o.utils.domData.set(i,n,d)}}(),o.exportSymbol("utils.setDomNodeChildrenFromArrayMapping",o.utils.setDomNodeChildrenFromArrayMapping),o.nativeTemplateEngine=function(){this.allowTemplateRewriting=!1},o.nativeTemplateEngine.prototype=new o.templateEngine,o.nativeTemplateEngine.prototype.renderTemplateSource=function(e,t,n){var r=!(o.utils.ieVersion<9),i=r?e.nodes:null,s=i?e.nodes():null;if(s)return o.utils.makeArray(s.cloneNode(!0).childNodes);var u=e.text();return o.utils.parseHtmlFragment(u)},o.nativeTemplateEngine.instance=new o.nativeTemplateEngine,o.setTemplateEngine(o.nativeTemplateEngine.instance),o.exportSymbol("nativeTemplateEngine",o.nativeTemplateEngine),function(){o.jqueryTmplTemplateEngine=function(){function n(){if(e<2)throw new Error("Your version of jQuery.tmpl is too old. Please upgrade to jQuery.tmpl 1.0.0pre or later.")}function r(e,t,n){return jQuery.tmpl(e,t,n)}var e=this.jQueryTmplVersion=function(){if(typeof jQuery=="undefined"||!jQuery.tmpl)return 0;try{if(jQuery.tmpl.tag.tmpl.open.toString().indexOf("__")>=0)return 2}catch(e){}return 1}();this.renderTemplateSource=function(e,i,s){s=s||{},n();var o=e.data("precompiled");if(!o){var u=e.text()||"";u="{{ko_with $item.koBindingContext}}"+u+"{{/ko_with}}",o=jQuery.template(null,u),e.data("precompiled",o)}var a=[i.$data],f=jQuery.extend({koBindingContext:i},s.templateOptions),l=r(o,a,f);return l.appendTo(t.createElement("div")),jQuery.fragments={},l},this.createJavaScriptEvaluatorBlock=function(e){return"{{ko_code ((function() { return "+e+" })()) }}"},this.addTemplate=function(e,n){t.write("<script type='text/html' id='"+e+"'>"+n+"</script>")},e>0&&(jQuery.tmpl.tag.ko_code={open:"__.push($1 || '');"},jQuery.tmpl.tag.ko_with={open:"with($1) {",close:"} "})},o.jqueryTmplTemplateEngine.prototype=new o.templateEngine;var e=new o.jqueryTmplTemplateEngine;e.jQueryTmplVersion>0&&o.setTemplateEngine(e),o.exportSymbol("jqueryTmplTemplateEngine",o.jqueryTmplTemplateEngine)}()})}(window,document,navigator),function(e){typeof require=="function"&&typeof exports=="object"&&typeof module=="object"?e(require("knockout"),exports):typeof define=="function"&&define.amd?define("knockout.mapping",["knockout","exports"],e):e(ko,ko.mapping={})}(function(e,t){function h(e,t){var n={};for(var r=e.length-1;r>=0;--r)n[e[r]]=e[r];for(var r=t.length-1;r>=0;--r)n[t[r]]=t[r];var i=[];for(var s in n)i.push(n[s]);return i}function p(e,n){for(var r in n)if(n.hasOwnProperty(r)&&n[r])if(r&&e[r]&&t.getType(e[r])!=="array")p(e[r],n[r]);else{var i=t.getType(e[r])==="array"&&t.getType(n[r])==="array";i?e[r]=h(e[r],n[r]):e[r]=n[r]}}function d(e,t){var n={};return p(n,e),p(n,t),n}function v(e,t){var n=d({},e);for(var r=a.length-1;r>=0;r--){var i=a[r];if(!n[i])continue;n[""]instanceof Object||(n[""]={}),n[""][i]=n[i],delete n[i]}return t&&(n.ignore=m(t.ignore,n.ignore),n.include=m(t.include,n.include),n.copy=m(t.copy,n.copy)),n.ignore=m(n.ignore,c.ignore),n.include=m(n.include,c.include),n.copy=m(n.copy,c.copy),n.mappedProperties=n.mappedProperties||{},n}function m(n,r){return t.getType(n)!=="array"&&(t.getType(n)==="undefined"?n=[]:n=[n]),t.getType(r)!=="array"&&(t.getType(r)==="undefined"?r=[]:r=[r]),e.utils.arrayGetDistinctValues(n.concat(r))}function g(t,r){var s=e.dependentObservable;e.dependentObservable=function(r,s,o){o=o||{},r&&typeof r=="object"&&(o=r);var u=o.deferEvaluation,a=!1,f=function(r){var s=e.dependentObservable;e.dependentObservable=i;var o=e.isWriteableObservable(r);e.dependentObservable=s;var u=i({read:function(){return a||(e.utils.arrayRemoveItem(t,r),a=!0),r.apply(r,arguments)},write:o&&function(e){return r(e)},deferEvaluation:!0});return n&&(u._wrapper=!0),u};o.deferEvaluation=!0;var l=new i(r,s,o);return u||(l=f(l),t.push(l)),l},e.dependentObservable.fn=i.fn,e.computed=e.dependentObservable;var o=r();return e.dependentObservable=s,e.computed=e.dependentObservable,o}function y(n,i,s,a,l,c,h){var p=t.getType(e.utils.unwrapObservable(i))==="array";c=c||"";if(t.isMapped(n)){var v=e.utils.unwrapObservable(n)[r];s=d(v,s)}var m={data:i,parent:h},w=function(){return s[a]&&s[a].create instanceof Function},N=function(t){return g(o,function(){return e.utils.unwrapObservable(l)instanceof Array?s[a].create({data:t||m.data,parent:m.parent,skip:f}):s[a].create({data:t||m.data,parent:m.parent})})},C=function(){return s[a]&&s[a].update instanceof Function},k=function(t,n){var r={data:n||m.data,parent:m.parent,target:e.utils.unwrapObservable(t)};return e.isWriteableObservable(t)&&(r.observable=t),s[a].update(r)},L=u.get(i);if(L)return L;a=a||"";if(!p)if(!T(i))switch(t.getType(i)){case"function":C()?e.isWriteableObservable(i)?(i(k(i)),n=i):n=k(i):n=i;break;default:if(e.isWriteableObservable(n)){if(C()){var A=k(n);return n(A),A}var A=e.utils.unwrapObservable(i);return n(A),A}return w()?(n=N(),n):(n=e.observable(e.utils.unwrapObservable(i)),n)}else{n=e.utils.unwrapObservable(n);if(!n){if(w()){var O=N();return C()&&(O=k(O)),O}if(C())return k(O);n={}}C()&&(n=k(n)),u.save(i,n);if(C())return n;x(i,function(t){var r=c.length?c+"."+t:t;if(e.utils.arrayIndexOf(s.ignore,r)!=-1)return;if(e.utils.arrayIndexOf(s.copy,r)!=-1){n[t]=i[t];return}var o=u.get(i[t]),a=y(n[t],i[t],s,t,n,r,n),f=o||a;e.isWriteableObservable(n[t])?n[t](e.utils.unwrapObservable(f)):n[t]=f,s.mappedProperties[r]=!0})}else{var M=[],_=!1,D=function(e){return e};s[a]&&s[a].key&&(D=s[a].key,_=!0),e.isObservable(n)||(n=e.observableArray([]),n.mappedRemove=function(e){var t=typeof e=="function"?e:function(t){return t===D(e)};return n.remove(function(e){return t(D(e))})},n.mappedRemoveAll=function(t){var r=S(t,D);return n.remove(function(t){return e.utils.arrayIndexOf(r,D(t))!=-1})},n.mappedDestroy=function(e){var t=typeof e=="function"?e:function(t){return t===D(e)};return n.destroy(function(e){return t(D(e))})},n.mappedDestroyAll=function(t){var r=S(t,D);return n.destroy(function(t){return e.utils.arrayIndexOf(r,D(t))!=-1})},n.mappedIndexOf=function(t){var r=S(n(),D),i=D(t);return e.utils.arrayIndexOf(r,i)},n.mappedCreate=function(t){if(n.mappedIndexOf(t)!==-1)throw new Error("There already is an object with the key that you specified.");var r=w()?N(t):t;if(C()){var i=k(r,t);e.isWriteableObservable(r)?r(i):r=i}return n.push(r),r});var P=S(e.utils.unwrapObservable(n),D).sort(),H=S(i,D);_&&H.sort();var B=e.utils.compareArrays(P,H),j={},F,I,q=e.utils.unwrapObservable(i),R={},U=!0;for(F=0,I=q.length;F<I;F++){var z=D(q[F]);if(z===undefined||z instanceof Object){U=!1;break}R[z]=q[F]}var W=[],X=0;for(F=0,I=B.length;F<I;F++){var z=B[F],V,$=c+"["+F+"]";switch(z.status){case"added":var J=U?R[z.value]:E(e.utils.unwrapObservable(i),z.value,D);V=y(undefined,J,s,a,n,$,l),w()||(V=e.utils.unwrapObservable(V));var K=b(e.utils.unwrapObservable(i),J,j);V===f?X++:W[K-X]=V,j[K]=!0;break;case"retained":var J=U?R[z.value]:E(e.utils.unwrapObservable(i),z.value,D);V=E(n,z.value,D),y(V,J,s,a,n,$,l);var K=b(e.utils.unwrapObservable(i),J,j);W[K]=V,j[K]=!0;break;case"deleted":V=E(n,z.value,D)}M.push({event:z.status,item:V})}n(W),s[a]&&s[a].arrayChanged&&e.utils.arrayForEach(M,function(e){s[a].arrayChanged(e.event,e.item)})}return n}function b(e,t,n){for(var r=0,i=e.length;r<i;r++){if(n[r]===!0)continue;if(e[r]===t)return r}return null}function w(n,r){var i;return r&&(i=r(n)),t.getType(i)==="undefined"&&(i=n),e.utils.unwrapObservable(i)}function E(t,n,r){t=e.utils.unwrapObservable(t);for(var i=0,s=t.length;i<s;i++){var o=t[i];if(w(o,r)===n)return o}throw new Error("When calling ko.update*, the key '"+n+"' was not found!")}function S(t,n){return e.utils.arrayMap(e.utils.unwrapObservable(t),function(e){return n?w(e,n):e})}function x(e,n){if(t.getType(e)==="array")for(var r=0;r<e.length;r++)n(r);else for(var i in e)n(i)}function T(e){var n=t.getType(e);return(n==="object"||n==="array")&&e!==null}function N(e,n,r){var i=e||"";return t.getType(n)==="array"?e&&(i+="["+r+"]"):(e&&(i+="."),i+=r),i}function C(){var t=[],n=[];this.save=function(r,i){var s=e.utils.arrayIndexOf(t,r);s>=0?n[s]=i:(t.push(r),n.push(i))},this.get=function(r){var i=e.utils.arrayIndexOf(t,r),s=i>=0?n[i]:undefined;return s}}function k(){var e={},t=function(t){var n;try{n=t}catch(r){n="$$$"}var i=e[n];return i===undefined&&(i=new C,e[n]=i),i};this.save=function(e,n){t(e).save(e,n)},this.get=function(e){return t(e).get(e)}}var n=!0,r="__ko_mapping__",i=e.dependentObservable,s=0,o,u,a=["create","update","key","arrayChanged"],f={},l={include:["_destroy"],ignore:[],copy:[]},c=l;t.isMapped=function(t){var n=e.utils.unwrapObservable(t);return n&&n[r]},t.fromJS=function(e){if(arguments.length==0)throw new Error("When calling ko.fromJS, pass the object you want to convert.");window.setTimeout(function(){s=0},0),s++||(o=[],u=new k);var t,n;arguments.length==2&&(arguments[1][r]?n=arguments[1]:t=arguments[1]),arguments.length==3&&(t=arguments[1],n=arguments[2]),n&&(t=d(t,n[r])),t=v(t);var i=y(n,e,t);return n&&(i=n),--s||window.setTimeout(function(){while(o.length){var e=o.pop();e&&e()}},0),i[r]=d(i[r],t),i},t.fromJSON=function(n){var r=e.utils.parseJson(n);return arguments[0]=r,t.fromJS.apply(this,arguments)},t.updateFromJS=function(e){throw new Error("ko.mapping.updateFromJS, use ko.mapping.fromJS instead. Please note that the order of parameters is different!")},t.updateFromJSON=function(e){throw new Error("ko.mapping.updateFromJSON, use ko.mapping.fromJSON instead. Please note that the order of parameters is different!")},t.toJS=function(n,i){c||t.resetDefaultOptions();if(arguments.length==0)throw new Error("When calling ko.mapping.toJS, pass the object you want to convert.");if(t.getType(c.ignore)!=="array")throw new Error("ko.mapping.defaultOptions().ignore should be an array.");if(t.getType(c.include)!=="array")throw new Error("ko.mapping.defaultOptions().include should be an array.");if(t.getType(c.copy)!=="array")throw new Error("ko.mapping.defaultOptions().copy should be an array.");return i=v(i,n[r]),t.visitModel(n,function(t){return e.utils.unwrapObservable(t)},i)},t.toJSON=function(n,r){var i=t.toJS(n,r);return e.utils.stringifyJson(i)},t.defaultOptions=function(){if(!(arguments.length>0))return c;c=arguments[0]},t.resetDefaultOptions=function(){c={include:l.include.slice(0),ignore:l.ignore.slice(0),copy:l.copy.slice(0)}},t.getType=function(e){if(e&&typeof e=="object"){if(e.constructor==(new Date).constructor)return"date";if(Object.prototype.toString.call(e)==="[object Array]")return"array"}return typeof e},t.visitModel=function(n,i,s){s=s||{},s.visitedObjects=s.visitedObjects||new k;var o,u=e.utils.unwrapObservable(n);if(!T(u))return i(n,s.parentName);s=v(s,u[r]),i(n,s.parentName),o=t.getType(u)==="array"?[]:{},s.visitedObjects.save(n,o);var a=s.parentName;return x(u,function(n){if(s.ignore&&e.utils.arrayIndexOf(s.ignore,n)!=-1)return;var f=u[n];s.parentName=N(a,u,n);if(e.utils.arrayIndexOf(s.copy,n)===-1&&e.utils.arrayIndexOf(s.include,n)===-1&&u[r]&&u[r].mappedProperties&&!u[r].mappedProperties[n]&&t.getType(u)!=="array")return;var l;switch(t.getType(e.utils.unwrapObservable(f))){case"object":case"array":case"undefined":var c=s.visitedObjects.get(f);o[n]=t.getType(c)!=="undefined"?c:t.visitModel(f,i,s);break;default:o[n]=i(f,s.parentName)}}),o}}),define("viewModels/MenuViewModel",["knockout","Sammy"],function(e,t){return function(e){this.el=$(e),this.enterRegistration=function(){this.el.trigger("new-registration")}.bind(this)}}),function(e,t){function _(e,t,n){this._d=e,this._isUTC=!!t,this._a=e._a||null,e._a=null,this._lang=n||!1}function D(e){var t=this._data={},n=e.years||e.y||0,r=e.months||e.M||0,i=e.weeks||e.w||0,s=e.days||e.d||0,o=e.hours||e.h||0,u=e.minutes||e.m||0,a=e.seconds||e.s||0,f=e.milliseconds||e.ms||0;this._milliseconds=f+a*1e3+u*6e4+o*36e5,this._days=s+i*7,this._months=r+n*12,t.milliseconds=f%1e3,a+=P(f/1e3),t.seconds=a%60,u+=P(a/60),t.minutes=u%60,o+=P(u/60),t.hours=o%24,s+=P(o/24),s+=i*7,t.days=s%30,r+=P(s/30),t.months=r%12,n+=P(r/12),t.years=n,this._lang=!1}function P(e){return e<0?Math.ceil(e):Math.floor(e)}function H(e,t){var n=e+"";while(n.length<t)n="0"+n;return n}function B(e,t,n){var r=t._milliseconds,i=t._days,s=t._months,o;r&&e._d.setTime(+e+r*n),i&&e.date(e.date()+i*n),s&&(o=e.date(),e.date(1).month(e.month()+s*n).date(Math.min(o,e.daysInMonth())))}function j(e){return Object.prototype.toString.call(e)==="[object Array]"}function F(e,t){var n=Math.min(e.length,t.length),r=Math.abs(e.length-t.length),i=0,s;for(s=0;s<n;s++)~~e[s]!==~~t[s]&&i++;return i+r}function I(t,n){var r,i;for(r=1;r<7;r++)t[r]=t[r]==null?r===2?1:0:t[r];return t[7]=n,i=new e(0),n?(i.setUTCFullYear(t[0],t[1],t[2]),i.setUTCHours(t[3],t[4],t[5],t[6])):(i.setFullYear(t[0],t[1],t[2]),i.setHours(t[3],t[4],t[5],t[6])),i._a=t,i}function q(e,t){var r,i,s=[];!t&&a&&(t=require("./lang/"+e));for(r=0;r<f.length;r++)t[f[r]]=t[f[r]]||o.en[f[r]];for(r=0;r<12;r++)i=n([2e3,r]),s[r]=new RegExp("^"+(t.months[r]||t.months(i,""))+"|^"+(t.monthsShort[r]||t.monthsShort(i,"")).replace(".",""),"i");return t.monthsParse=t.monthsParse||s,o[e]=t,t}function R(e){var t=typeof e=="string"&&e||e&&e._lang||null;return t?o[t]||q(t):n}function U(e){return A[e]?"'+("+A[e]+")+'":e.replace(p,"").replace(/\\?'/g,"\\'")}function z(e){return R().longDateFormat[e]||e}function W(e){var t="var a,b;return '"+e.replace(c,U)+"';",n=Function;return new n("t","v","o","p","m",t)}function X(e){return L[e]||(L[e]=W(e)),L[e]}function V(e,t){function r(r,i){return n[r].call?n[r](e,t):n[r][i]}var n=R(e);while(h.test(t))t=t.replace(h,z);return L[t]||(L[t]=W(t)),L[t](e,r,n.ordinal,H,n.meridiem)}function $(e){switch(e){case"DDDD":return g;case"YYYY":return y;case"S":case"SS":case"SSS":case"DDD":return m;case"MMM":case"MMMM":case"dd":case"ddd":case"dddd":case"a":case"A":return b;case"Z":case"ZZ":return w;case"T":return E;case"MM":case"DD":case"YY":case"HH":case"hh":case"mm":case"ss":case"M":case"D":case"d":case"H":case"h":case"m":case"s":return v;default:return new RegExp(e.replace("\\",""))}}function J(e,t,n,r){var i;switch(e){case"M":case"MM":n[1]=t==null?0:~~t-1;break;case"MMM":case"MMMM":for(i=0;i<12;i++)if(R().monthsParse[i].test(t)){n[1]=i;break}break;case"D":case"DD":case"DDD":case"DDDD":t!=null&&(n[2]=~~t);break;case"YY":t=~~t,n[0]=t+(t>70?1900:2e3);break;case"YYYY":n[0]=~~Math.abs(t);break;case"a":case"A":r.isPm=(t+"").toLowerCase()==="pm";break;case"H":case"HH":case"h":case"hh":n[3]=~~t;break;case"m":case"mm":n[4]=~~t;break;case"s":case"ss":n[5]=~~t;break;case"S":case"SS":case"SSS":n[6]=~~(("0."+t)*1e3);break;case"Z":case"ZZ":r.isUTC=!0,i=(t+"").match(N),i&&i[1]&&(r.tzh=~~i[1]),i&&i[2]&&(r.tzm=~~i[2]),i&&i[0]==="+"&&(r.tzh=-r.tzh,r.tzm=-r.tzm)}}function K(e,t){var n=[0,0,1,0,0,0,0],r={tzh:0,tzm:0},i=t.match(c),s,o;for(s=0;s<i.length;s++)o=($(i[s]).exec(e)||[])[0],e=e.replace($(i[s]),""),J(i[s],o,n,r);return r.isPm&&n[3]<12&&(n[3]+=12),r.isPm===!1&&n[3]===12&&(n[3]=0),n[3]+=r.tzh,n[4]+=r.tzm,I(n,r.isUTC)}function Q(e,t){var n,r=e.match(d)||[],i,s=99,o,u,a;for(o=0;o<t.length;o++)u=K(e,t[o]),i=V(new _(u),t[o]).match(d)||[],a=F(r,i),a<s&&(s=a,n=u);return n}function G(t){var n="YYYY-MM-DDT",r;if(S.exec(t)){for(r=0;r<4;r++)if(T[r][1].exec(t)){n+=T[r][0];break}return w.exec(t)?K(t,n+" Z"):K(t,n)}return new e(t)}function Y(e,t,n,r,i){var s=i.relativeTime[e];return typeof s=="function"?s(t||1,!!n,e,r):s.replace(/%d/i,t||1)}function Z(e,t,n){var r=i(Math.abs(e)/1e3),s=i(r/60),o=i(s/60),u=i(o/24),a=i(u/365),f=r<45&&["s",r]||s===1&&["m"]||s<45&&["mm",s]||o===1&&["h"]||o<22&&["hh",o]||u===1&&["d"]||u<=25&&["dd",u]||u<=45&&["M"]||u<345&&["MM",i(u/30)]||a===1&&["y"]||["yy",a];return f[2]=t,f[3]=e>0,f[4]=n,Y.apply({},f)}function et(e,t){n.fn[e]=function(e){var n=this._isUTC?"UTC":"";return e!=null?(this._d["set"+n+t](e),this):this._d["get"+n+t]()}}function tt(e){n.duration.fn[e]=function(){return this._data[e]}}function nt(e,t){n.duration.fn["as"+e]=function(){return+this/t}}var n,r="1.7.0",i=Math.round,s,o={},u="en",a=typeof module!="undefined"&&module.exports,f="months|monthsShort|weekdays|weekdaysShort|weekdaysMin|longDateFormat|calendar|relativeTime|ordinal|meridiem".split("|"),l=/^\/?Date\((\-?\d+)/i,c=/(\[[^\[]*\])|(\\)?(Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|YYYY|YY|a|A|hh?|HH?|mm?|ss?|SS?S?|zz?|ZZ?)/g,h=/(LT|LL?L?L?)/g,p=/(^\[)|(\\)|\]$/g,d=/([0-9a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+)/gi,v=/\d\d?/,m=/\d{1,3}/,g=/\d{3}/,y=/\d{1,4}/,b=/[0-9a-z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+/i,w=/Z|[\+\-]\d\d:?\d\d/i,E=/T/i,S=/^\s*\d{4}-\d\d-\d\d(T(\d\d(:\d\d(:\d\d(\.\d\d?\d?)?)?)?)?([\+\-]\d\d:?\d\d)?)?/,x="YYYY-MM-DDTHH:mm:ssZ",T=[["HH:mm:ss.S",/T\d\d:\d\d:\d\d\.\d{1,3}/],["HH:mm:ss",/T\d\d:\d\d:\d\d/],["HH:mm",/T\d\d:\d\d/],["HH",/T\d\d/]],N=/([\+\-]|\d\d)/gi,C="Month|Date|Hours|Minutes|Seconds|Milliseconds".split("|"),k={Milliseconds:1,Seconds:1e3,Minutes:6e4,Hours:36e5,Days:864e5,Months:2592e6,Years:31536e6},L={},A={M:"(a=t.month()+1)",MMM:'v("monthsShort",t.month())',MMMM:'v("months",t.month())',D:"(a=t.date())",DDD:"(a=new Date(t.year(),t.month(),t.date()),b=new Date(t.year(),0,1),a=~~(((a-b)/864e5)+1.5))",d:"(a=t.day())",dd:'v("weekdaysMin",t.day())',ddd:'v("weekdaysShort",t.day())',dddd:'v("weekdays",t.day())',w:"(a=new Date(t.year(),t.month(),t.date()-t.day()+5),b=new Date(a.getFullYear(),0,4),a=~~((a-b)/864e5/7+1.5))",YY:"p(t.year()%100,2)",YYYY:"p(t.year(),4)",a:"m(t.hours(),t.minutes(),!0)",A:"m(t.hours(),t.minutes(),!1)",H:"t.hours()",h:"t.hours()%12||12",m:"t.minutes()",s:"t.seconds()",S:"~~(t.milliseconds()/100)",SS:"p(~~(t.milliseconds()/10),2)",SSS:"p(t.milliseconds(),3)",Z:'((a=-t.zone())<0?((a=-a),"-"):"+")+p(~~(a/60),2)+":"+p(~~a%60,2)',ZZ:'((a=-t.zone())<0?((a=-a),"-"):"+")+p(~~(10*a/6),4)'},O="DDD w M D d".split(" "),M="M D H h m s w".split(" ");while(O.length)s=O.pop(),A[s+"o"]=A[s]+"+o(a)";while(M.length)s=M.pop(),A[s+s]="p("+A[s]+",2)";A.DDDD="p("+A.DDD+",3)",n=function(r,i){if(r===null||r==="")return null;var s,o;return n.isMoment(r)?new _(new e(+r._d),r._isUTC,r._lang):(i?j(i)?s=Q(r,i):s=K(r,i):(o=l.exec(r),s=r===t?new e:o?new e(+o[1]):r instanceof e?r:j(r)?I(r):typeof r=="string"?G(r):new e(r)),new _(s))},n.utc=function(e,t){return j(e)?new _(I(e,!0),!0):(typeof e=="string"&&!w.exec(e)&&(e+=" +0000",t&&(t+=" Z")),n(e,t).utc())},n.unix=function(e){return n(e*1e3)},n.duration=function(e,t){var r=n.isDuration(e),i=typeof e=="number",s=r?e._data:i?{}:e,o;return i&&(t?s[t]=e:s.milliseconds=e),o=new D(s),r&&(o._lang=e._lang),o},n.humanizeDuration=function(e,t,r){return n.duration(e,t===!0?null:t).humanize(t===!0?!0:r)},n.version=r,n.defaultFormat=x,n.lang=function(e,t){var r;if(!e)return u;(t||!o[e])&&q(e,t);if(o[e]){for(r=0;r<f.length;r++)n[f[r]]=o[e][f[r]];n.monthsParse=o[e].monthsParse,u=e}},n.langData=R,n.isMoment=function(e){return e instanceof _},n.isDuration=function(e){return e instanceof D},n.lang("en",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D YYYY",LLL:"MMMM D YYYY LT",LLLL:"dddd, MMMM D YYYY LT"},meridiem:function(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},ordinal:function(e){var t=e%10;return~~(e%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th"}}),n.fn=_.prototype={clone:function(){return n(this)},valueOf:function(){return+this._d},unix:function(){return Math.floor(+this._d/1e3)},toString:function(){return this._d.toString()},toDate:function(){return this._d},toArray:function(){var e=this;return[e.year(),e.month(),e.date(),e.hours(),e.minutes(),e.seconds(),e.milliseconds(),!!this._isUTC]},isValid:function(){return this._a?!F(this._a,(this._a[7]?n.utc(this):this).toArray()):!isNaN(this._d.getTime())},utc:function(){return this._isUTC=!0,this},local:function(){return this._isUTC=!1,this},format:function(e){return V(this,e?e:n.defaultFormat)},add:function(e,t){var r=t?n.duration(+t,e):n.duration(e);return B(this,r,1),this},subtract:function(e,t){var r=t?n.duration(+t,e):n.duration(e);return B(this,r,-1),this},diff:function(e,t,r){var s=this._isUTC?n(e).utc():n(e).local(),o=(this.zone()-s.zone())*6e4,u=this._d-s._d-o,a=this.year()-s.year(),f=this.month()-s.month(),l=this.date()-s.date(),c;return t==="months"?c=a*12+f+l/30:t==="years"?c=a+(f+l/30)/12:c=t==="seconds"?u/1e3:t==="minutes"?u/6e4:t==="hours"?u/36e5:t==="days"?u/864e5:t==="weeks"?u/6048e5:u,r?c:i(c)},from:function(e,t){return n.duration(this.diff(e)).lang(this._lang).humanize(!t)},fromNow:function(e){return this.from(n(),e)},calendar:function(){var e=this.diff(n().sod(),"days",!0),t=this.lang().calendar,r=t.sameElse,i=e<-6?r:e<-1?t.lastWeek:e<0?t.lastDay:e<1?t.sameDay:e<2?t.nextDay:e<7?t.nextWeek:r;return this.format(typeof i=="function"?i.apply(this):i)},isLeapYear:function(){var e=this.year();return e%4===0&&e%100!==0||e%400===0},isDST:function(){return this.zone()<n([this.year()]).zone()||this.zone()<n([this.year(),5]).zone()},day:function(e){var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return e==null?t:this.add({d:e-t})},startOf:function(e){switch(e.replace(/s$/,"")){case"year":this.month(0);case"month":this.date(1);case"day":this.hours(0);case"hour":this.minutes(0);case"minute":this.seconds(0);case"second":this.milliseconds(0)}return this},endOf:function(e){return this.startOf(e).add(e.replace(/s?$/,"s"),1).subtract("ms",1)},sod:function(){return this.clone().startOf("day")},eod:function(){return this.clone().endOf("day")},zone:function(){return this._isUTC?0:this._d.getTimezoneOffset()},daysInMonth:function(){return n.utc([this.year(),this.month()+1,0]).date()},lang:function(e){return e===t?R(this):(this._lang=e,this)}};for(s=0;s<C.length;s++)et(C[s].toLowerCase(),C[s]);et("year","FullYear"),n.duration.fn=D.prototype={weeks:function(){return P(this.days()/7)},valueOf:function(){return this._milliseconds+this._days*864e5+this._months*2592e6},humanize:function(e){var t=+this,n=this.lang().relativeTime,r=Z(t,!e,this.lang());return e&&(r=(t<=0?n.past:n.future).replace(/%s/i,r)),r},lang:n.fn.lang};for(s in k)k.hasOwnProperty(s)&&(nt(s,k[s]),tt(s.toLowerCase()));nt("Weeks",6048e5),a&&(module.exports=n),typeof ender=="undefined"&&(this.moment=n),typeof define=="function"&&define.amd&&define("moment",[],function(){return n})}.call(this,Date),function(e,t){e.toastr=function(){var e={tapToDismiss:!0,toastClass:"toast",containerId:"toast-container",debug:!1,fadeIn:300,fadeOut:1e3,extendedTimeOut:1e3,iconClasses:{error:"toast-error",info:"toast-info",success:"toast-success",warning:"toast-warning"},iconClass:"toast-info",positionClass:"toast-top-right",timeOut:5e3,titleClass:"toast-title",messageClass:"toast-message"},n=function(e,t){return o({iconClass:i().iconClasses.error,message:e,title:t})},r=function(e){var n=t("#"+e.containerId);return n.length?n:(n=t("<div/>").attr("id",e.containerId).addClass(e.positionClass),n.appendTo(t("body")),n)},i=function(){return t.extend({},e,toastr.options)},s=function(e,t){return o({iconClass:i().iconClasses.info,message:e,title:t})},o=function(e){var n=i(),s=e.iconClass||n.iconClass,o=null,u=r(n),a=t("<div/>"),f=t("<div/>"),l=t("<div/>"),c={options:n,map:e};e.iconClass&&a.addClass(n.toastClass).addClass(s),e.title&&(f.append(e.title).addClass(n.titleClass),a.append(f)),e.message&&(l.append(e.message).addClass(n.messageClass),a.append(l));var h=function(){if(t(":focus",a).length>0)return;var e=function(){return a.fadeOut(n.fadeOut)};t.when(e()).done(function(){if(a.is(":visible"))return;a.remove(),u.children().length===0&&u.remove()})},p=function(){if(n.timeOut>0||n.extendedTimeOut>0)o=setTimeout(h,n.extendedTimeOut)},d=function(){clearTimeout(o),a.stop(!0,!0).fadeIn(n.fadeIn)};return a.hide(),u.prepend(a),a.fadeIn(n.fadeIn),n.timeOut>0&&(o=setTimeout(h,n.timeOut)),a.hover(d,p),n.tapToDismiss&&a.click(h),n.debug&&console.log(c),a},u=function(e,t){return o({iconClass:i().iconClasses.success,message:e,title:t})},a=function(e,t){return o({iconClass:i().iconClasses.warning,message:e,title:t})};return{error:n,info:s,options:{},success:u,warning:a}}()}(window,jQuery),define("toastr",function(){}),function(){var e,t,n,r,i,s,o,u,a=Array.prototype.indexOf||function(e){for(var t=0,n=this.length;t<n;t++)if(t in this&&this[t]===e)return t;return-1};e=typeof jQuery!="undefined"&&jQuery!==null?jQuery:require("jqueryify");if(!e)throw"jQuery required";(u=e.support).transition||(u.transition=function(){var e;return e=(new Image).style,"transition"in e||"webkitTransition"in e||"MozTransition"in e}()),s=e.browser.mozilla?"moz":void 0,s=s||e.browser.webkit?"webkit":void 0,r=s?"-"+s+"-":"",o=n={transition:""+r+"transition",transform:""+r+"transform",transitionEnd:""+s+"TransitionEnd"},t={duration:400,queue:!0,easing:"",enabled:e.support.transition},i=["scale","scaleX","scaleY","scale3d","rotate","rotateX","rotateY","rotateZ","rotate3d","translate","translateX","translateY","translateZ","translate3d","skew","skewX","skewY","matrix","matrix3d","perspective"],e.fn.queueNext=function(e,t){return t||(t="fx"),this.queue(function(){var n;return e.apply(this,arguments),n=this.offsetHeight,jQuery.dequeue(this,t)})},e.fn.emulateTransitionEnd=function(t){var r,i,s=this;return i=!1,e(this).one(n.transitionEnd,function(){return i=!0}),r=function(){if(!i)return e(s).trigger(n.transitionEnd)},setTimeout(r,t)},e.fn.transform=function(s,o){var u,f,l,c;f=e.extend({},t,o);if(!f.enabled)return this;l=[];for(u in s){c=s[u];if(!(a.call(i,u)>=0))continue;l.push(""+u+"("+c+")"),delete s[u]}return l.length&&(s[n.transform]=l.join(" ")),f.origin&&(s[""+r+"transform-origin"]=f.origin),e(this).css(s)},e.fn.gfx=function(r,i){var s,o;return o=e.extend({},t,i),o.enabled?(r[n.transition]="all "+o.duration+"ms "+o.easing,s=function(){var t;return e(this).css(n.transition,""),(t=o.complete)!=null&&t.apply(this,arguments),e(this).dequeue()},this[o.queue===!1?"each":"queue"](function(){return e(this).one(n.transitionEnd,s),e(this).transform(r),e(this).emulateTransitionEnd(o.duration+50)})):this}}.call(this),define("gfx",function(){}),function(){$.fn.gfxPopIn=function(e){return e==null&&(e={}),e.scale==null&&(e.scale=".2"),$(this).queueNext(function(){return $(this).transform({"-webkit-transform-origin":"50% 50%","-moz-transform-origin":"50% 50%",scale:e.scale}).show()}),$(this).gfx({scale:"1",opacity:"1"},e)},$.fn.gfxPopOut=function(e){return $(this).queueNext(function(){return $(this).transform({"-webkit-transform-origin":"50% 50%","-moz-transform-origin":"50% 50%",scale:"1",opacity:"1"})}),$(this).gfx({scale:".2",opacity:"0"},e),$(this).queueNext(function(){return $(this).hide().transform({opacity:"1",scale:"1"})})},$.fn.gfxFadeIn=function(e){return e==null&&(e={}),e.duration==null&&(e.duration=1e3),$(this).queueNext(function(){return $(this).css({opacity:"0"}).show()}),$(this).gfx({opacity:1},e)},$.fn.gfxFadeOut=function(e){return e==null&&(e={}),$(this).queueNext(function(){return $(this).css({opacity:1})}),$(this).gfx({opacity:0},e),$(this).queueNext(function(){return $(this).hide().css({opacity:1})})},$.fn.gfxShake=function(e){var t;return e==null&&(e={}),e.duration==null&&(e.duration=100),e.easing==null&&(e.easing="ease-out"),t=e.distance||20,$(this).gfx({translateX:"-"+t+"px"},e),$(this).gfx({translateX:""+t+"px"},e),$(this).gfx({translateX:"-"+t+"px"},e),$(this).gfx({translateX:""+t+"px"},e),$(this).queueNext(function(){return $(this).transform({translateX:0})})},$.fn.gfxBlip=function(e){return e==null&&(e={}),e.scale||(e.scale="1.15"),$(this).gfx({scale:e.scale},e),$(this).gfx({scale:"1"},e)},$.fn.gfxExplodeIn=function(e){return e==null&&(e={}),e.scale||(e.scale="3"),$(this).queueNext(function(){return $(this).transform({scale:e.scale,opacity:"0"}).show()}),$(this).gfx({scale:"1",opacity:"1"},e)},$.fn.gfxExplodeOut=function(e){return e==null&&(e={}),e.scale||(e.scale="3"),$(this).queueNext(function(){return $(this).transform({scale:"1",opacity:"1"})}),$(this).gfx({scale:e.scale,opacity:"0"},e),e.reset!==!1&&$(this).queueNext(function(){return $(this).hide().transform({scale:"1",opacity:"1"})}),this},$.fn.gfxFlipIn=function(e){return e==null&&(e={}),$(this).queueNext(function(){return $(this).transform({rotateY:"180deg",scale:".8",display:"block"})}),$(this).gfx({rotateY:0,scale:1},e)},$.fn.gfxFlipOut=function(e){return e==null&&(e={}),$(this).queueNext(function(){return $(this).transform({rotateY:0,scale:1})}),$(this).gfx({rotateY:"-180deg",scale:".8"},e),e.reset!==!1&&$(this).queueNext(function(){return $(this).transform({scale:1,rotateY:0,display:"none"})}),this},$.fn.gfxRotateOut=function(e){return e==null&&(e={}),$(this).queueNext(function(){return $(this).transform({rotateY:0}).fix()}),$(this).gfx({rotateY:"-180deg"},e),e.reset!==!1&&$(this).queueNext(function(){return $(this).transform({rotateY:0,display:"none"}).unfix()}),this},$.fn.gfxRotateIn=function(e){var t;return e==null&&(e={}),t(this).queueNext(function(){return t(this).transform({rotateY:"180deg",display:"block"}).fix()}),t(this).gfx({rotateY:0},e),t(this).queueNext(function(){return t(this).unfix()}),t=jQuery},$.fn.gfxSlideOut=function(e){var t,n;return e==null&&(e={}),e.direction||(e.direction="right"),t=e.distance||100,e.direction==="left"&&(t*=-1),t+="%",n=e.fade?0:1,$(this).queueNext(function(){return $(this).show()}),$(this).gfx({translate3d:""+t+",0,0",opacity:n},e),$(this).queueNext(function(){return $(this).transform({translate3d:"0,0,0",opacity:1}).hide()})},$.fn.gfxSlideIn=function(e){var t,n;return e==null&&(e={}),e.direction||(e.direction="right"),t=e.distance||100,e.direction==="left"&&(t*=-1),t+="%",n=e.fade?0:1,$(this).queueNext(function(){return $(this).transform({translate3d:""+t+",0,0",opacity:n}).show()}),$(this).gfx({translate3d:"0,0,0",opacity:1},e)},$.fn.gfxRaisedIn=function(e){return e==null&&(e={}),$(this).queueNext(function(){return $(this).transform({scale:"1",opacity:"0",translate3d:"0,-15px,0"}).show()}),$(this).gfx({scale:"1",opacity:"1",translate3d:"0,0,0"},e)},$.fn.gfxRaisedOut=function(e){return e==null&&(e={}),$(this).queueNext(function(){return $(this).transform({scale:"1",opacity:"1",translate3d:"0,0,0"})}),$(this).gfx({scale:"1",opacity:"0",translate3d:"0,-8px,0"},e),$(this).queueNext(function(){return $(this).hide().transform({scale:"1",opacity:"1",translate3d:"0,0,0"})})},$.fn.fix=function(){return $(this).each(function(){var e,t,n;return e=$(this),n=e.offset(),t=e.parent().offset(),n.left-=t.left,n.top-=t.top,n.position="absolute",e.css(n)})},$.fn.unfix=function(){return $(this).each(function(){var e;return e=$(this),e.css({position:"",top:"",left:""})})}}.call(this),define("gfx/effects",function(){}),define("viewModels/MainViewModel",["knockout","Sammy","moment","toastr","gfx/effects"],function(e,t,n){var r=function(){return this.Street1+", "+this.Suburb+", "+this.State+" "+this.Postcode},i=function(){var e=n(this.Birthday).year(n().year()),t=e>n()?"is":"was";return"which "+t+" "+e.fromNow()},s=function(){$("#source").queueNext(function(){$("#source").quicksand($("#destination li"),{duration:800,easing:"easeInOutQuad",adjustHeight:!1,useScaling:!1},function(){})})},o=function(e,t){return e.LastName.localeCompare(t.LastName)},u=function(e,t){var r=n(e.Birthday).year(n().year()),i=n(t.Birthday).year(n().year()),s=0;return r>i?s=1:r<i&&(s=-1),s},a=function(t){$.extend(t,{Address:r,BirthdayFromNow:i}),t.HasBeenSentVoucherThisYear=e.observable(t.HasBeenSentVoucherThisYear||!1),t.HasRedeemedVoucher=e.observable(t.HasRedeemedVoucher||!1)};return function(t){var r=this;this.el=$(t),this.contactsView=this.el.find("#view-contacts"),this.exportView=this.el.find("#export-contacts"),this.url=App.urlBuilder("contacts"),this.mailingUrl=App.urlBuilder("mailings"),this.title=e.observable("Contacts"),this.subTitle=e.observable("By Month"),this.registrations=e.observableArray([]),this.allRegistrations=[],this.selectedMonth=e.observable(null),this.sortBy=e.observable(null),this.searchText=e.observable(null),this.forExport=e.observableArray([]),this._updateUIVersion=0,$("body").bind("delete-contact-confirmed",function(t){var n=e.utils.arrayIndexOf(r.selectedMonth().Registrations,t.contact),i=e.utils.arrayIndexOf(r.allRegistrations,t.contact);n>=0&&(r.selectedMonth().Registrations.splice(n,1),r.selectedMonth().ComputedList.remove(t.contact)),i>0&&r.allRegistrations.splice(i,1),s()}),$("body").bind("update-contact",function(t){a(t.contact,r);var i=e.utils.arrayIndexOf(r.allRegistrations,t.oldContact||{});i>-1&&(e.mapping.fromJS(t.contact,{},r.allRegistrations[i]),r.allRegistrations[i]=t.contact),$.each(r.registrations(),function(i,s){var o=e.utils.arrayIndexOf(s.Registrations,t.oldContact||{});o>-1?(s.Registrations[o]=t.contact,r.selectedMonth(s)):s.Month==n(t.contact.Birthday).format("MMMM")&&(s.Registrations.push(t.contact),r.allRegistrations.push(t.contact),s.ComputedList(s.Registrations.slice()),r.selectedMonth(s))}),$("#source li.flipped[data-id='"+t.contact.Id+"']").trigger("flip")}),$("body").bind("update-by-id",function(e){var t=null;$.each(r.allRegistrations,function(){if(this.Id===e.contact.Id){t=this;return}}),r.el.trigger({type:e.callback,oldContact:t,contact:e.contact})}),this.selectedMonthSorted=e.computed(function(){var t=r.selectedMonth(),n=r.sortBy(),i=r.searchText();if(typeof t=="undefined"||t==null)return null;var a=function(){t.ComputedList=t.ComputedList||e.observableArray(t.Registrations.slice()),t.ComputedList.removeAll(),$.each(t.Registrations,function(e,n){i!=null&&i.length>0?(n.FirstName.toLowerCase().indexOf(i.toLowerCase())>-1||n.LastName.toLowerCase().indexOf(i.toLowerCase())>-1)&&t.ComputedList.push(n):t.ComputedList.push(n)});var r=n=="lastName"?o:u;t.ComputedList.sort(r),s()};r._updateUIVersion++;var f=r._updateUIVersion;return setTimeout(function(){f==r._updateUIVersion&&a.call(r)},300),t},this),this.responded=function(e,t){t.preventDefault(),$.ajax({url:r.mailingUrl("ContactResponded"),dataType:"json",type:"PUT",data:JSON.stringify({Id:e.Id}),accept:"application/json",contentType:"application/json"}).success(function(t){e.HasRedeemedVoucher(n()),$("#source li[data-id='"+e.Id+"']").trigger("flip"),s(),toastr.success("Saved")}).fail(function(){toastr.error("Failed to save record :'(")})}.bind(this),this.deleteClicked=function(e,t){t.preventDefault(),r.el.trigger({type:"delete-contact",contact:e})}.bind(this),this.editClicked=function(e,t){t.preventDefault(),r.el.trigger({type:"edit-registration",contact:e})}.bind(this),this.exportClicked=function(e,t){t.preventDefault(),App.navigate("registrations",r.selectedMonth().Month,"export")}.bind(this),this.clearForExport=function(e,t){t.preventDefault(),App.navigate("registrations",r.selectedMonth().Month)}.bind(this),this.confirmExportClicked=function(e,t){t.preventDefault();var i=[];$.each(r.forExport(),function(e,t){t.shouldExport()==1&&i.push(t.Id)}),$.ajax({url:r.mailingUrl("CreateForContacts"),dataType:"json",type:"POST",data:JSON.stringify(i),accept:"application/json",contentType:"application/json"}).success(function(e){toastr.success("Mailings have been created!"),$.each(r.forExport(),function(e,t){t.shouldExport()==1&&t.HasBeenSentVoucherThisYear(n())}),App.navigate("registrations",r.selectedMonth().Month)}).fail(function(){toastr.error("Failed to create mailing records, something went wrong :'(")})}.bind(this),this.loadData=function(){var t=$.Deferred();return $.ajax({url:r.url("GetRegistrationsByMonth"),dataType:"json",type:"GET",accept:"application/json",contentType:"application/json"}).success(function(n){r.registrations.removeAll(),r.registrations.push({Month:"All",Registrations:r.allRegistrations,ComputedList:e.observableArray(r.allRegistrations.slice())}),$.each(n,function(t,n){$.each(n.Registrations,function(){a(this,r),r.allRegistrations.push(this)}),n.ComputedList=n.ComputedList||e.observableArray(n.Registrations.slice()),r.registrations.push(n)}),t.resolve()}).fail(function(){t.reject()}),t.promise()},this.populateRegistrations=function(e){$.each(r.registrations(),function(t,n){n.Month==e&&r.selectedMonth(n)}),s()}.bind(this),this.routes=function(){return{"#/":function(){r.loadData(),r.selectedMonth(null)},"#/registrations/:month":function(e){r.forExport.removeAll(),r.registrations().length==0?r.loadData().done(function(){r.populateRegistrations(e.params.month)}):r.contactsView.queueNext(function(){r.exportView.is(":visible")&&r.exportView.gfxRaisedOut().hide()}).queueNext(function(){r.contactsView.is(":visible")==0&&(r.contactsView.gfxRaisedIn(),r.contactsView.removeAttr("style"))}).queueNext(function(){r.populateRegistrations(e.params.month)})},"#/registrations/:month/export":function(t){r.forExport.removeAll(),$.each(r.selectedMonth().ComputedList(),function(t,n){n.shouldExport=e.observable(!0),r.forExport.push(n)}),r.exportView.queueNext(function(){r.contactsView.gfxRaisedOut().hide()}).queueNext(function(){r.exportView.gfxRaisedIn().removeAttr("style")})}}}}}),define("viewModels/SideViewModel",["knockout"],function(e){return function(t){this.el=$(t),this.registrations=e.observableArray([]),this.selectedMonth=e.observable()}}),function(e,t){(function(n){typeof define=="function"&&define.amd?define("sammy",["jquery"],n):e.sammy=t.Sammy=n(e)})(function(e){var n,r="([^/]+)",i=/:([\w\d]+)/g,s=/\?([^#]*)?$/,o=function(e){return Array.prototype.slice.call(e)},u=function(e){return Object.prototype.toString.call(e)==="[object Function]"},a=function(e){return Object.prototype.toString.call(e)==="[object Array]"},f=function(e){return Object.prototype.toString.call(e)==="[object RegExp]"},l=function(e){return decodeURIComponent((e||"").replace(/\+/g," "))},c=encodeURIComponent,h=function(e){return String(e).replace(/&(?!\w+;)/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")},p=function(e){return function(t,n){return this.route.apply(this,[e,t,n])}},d={},v=!!t.history&&!!history.pushState,m=[];return n=function(){var t=o(arguments),r,i;n.apps=n.apps||{};if(t.length===0||t[0]&&u(t[0]))return n.apply(n,["body"].concat(t));if(typeof (i=t.shift())=="string")return r=n.apps[i]||new n.Application,r.element_selector=i,t.length>0&&e.each(t,function(e,t){r.use(t)}),r.element_selector!=i&&delete n.apps[i],n.apps[r.element_selector]=r,r},n.VERSION="0.7.1",n.addLogger=function(e){m.push(e)},n.log=function(){var t=o(arguments);t.unshift("["+Date()+"]"),e.each(m,function(e,r){r.apply(n,t)})},typeof t.console!="undefined"?u(t.console.log.apply)?n.addLogger(function(){t.console.log.apply(t.console,arguments)}):n.addLogger(function(){t.console.log(arguments)}):typeof console!="undefined"&&n.addLogger(function(){console.log.apply(console,arguments)}),e.extend(n,{makeArray:o,isFunction:u,isArray:a}),n.Object=function(t){return e.extend(this,t||{})},e.extend(n.Object.prototype,{escapeHTML:h,h:h,toHash:function(){var t={};return e.each(this,function(e,n){u(n)||(t[e]=n)}),t},toHTML:function(){var t="";return e.each(this,function(e,n){u(n)||(t+="<strong>"+e+"</strong> "+n+"<br />")}),t},keys:function(e){var t=[];for(var n in this)(!u(this[n])||!e)&&t.push(n);return t},has:function(t){return this[t]&&e.trim(this[t].toString())!==""},join:function(){var e=o(arguments),t=e.shift();return e.join(t)},log:function(){n.log.apply(n,arguments)},toString:function(t){var n=[];return e.each(this,function(e,r){(!u(r)||t)&&n.push('"'+e+'": '+r.toString())}),"Sammy.Object: {"+n.join(",")+"}"}}),n.DefaultLocationProxy=function(e,t){this.app=e,this.is_native=!1,this.has_history=v,this._startPolling(t)},n.DefaultLocationProxy.fullPath=function(e){var t=e.toString().match(/^[^#]*(#.+)$/),n=t?t[1]:"";return[e.pathname,e.search,n].join("")},e.extend(n.DefaultLocationProxy.prototype,{bind:function(){var r=this,i=this.app,s=n.DefaultLocationProxy;e(t).bind("hashchange."+this.app.eventNamespace(),function(e,n){r.is_native===!1&&!n&&(r.is_native=!0,t.clearInterval(s._interval)),i.trigger("location-changed")}),v&&!i.disable_push_state&&(e(t).bind("popstate."+this.app.eventNamespace(),function(e){i.trigger("location-changed")}),e("a").live("click.history-"+this.app.eventNamespace(),function(e){if(e.isDefaultPrevented()||e.metaKey||e.ctrlKey)return;var n=s.fullPath(this);if(this.hostname==t.location.hostname&&i.lookupRoute("get",n)&&this.target!=="_blank")return e.preventDefault(),r.setLocation(n),!1})),s._bindings||(s._bindings=0),s._bindings++},unbind:function(){e(t).unbind("hashchange."+this.app.eventNamespace()),e(t).unbind("popstate."+this.app.eventNamespace()),e("a").die("click.history-"+this.app.eventNamespace()),n.DefaultLocationProxy._bindings--,n.DefaultLocationProxy._bindings<=0&&t.clearInterval(n.DefaultLocationProxy._interval)},getLocation:function(){return n.DefaultLocationProxy.fullPath(t.location)},setLocation:function(e){/^([^#\/]|$)/.test(e)&&(v&&!this.app.disable_push_state?e="/"+e:e="#!/"+e);if(e!=this.getLocation()){if(!(v&&!this.app.disable_push_state&&/^\//.test(e)))return t.location=e;history.pushState({path:e},t.title,e),this.app.trigger("location-changed")}},_startPolling:function(r){var i=this;if(!n.DefaultLocationProxy._interval){r||(r=10);var s=function(){var r=i.getLocation();(typeof n.DefaultLocationProxy._last_location=="undefined"||r!=n.DefaultLocationProxy._last_location)&&t.setTimeout(function(){e(t).trigger("hashchange",[!0])},0),n.DefaultLocationProxy._last_location=r};s(),n.DefaultLocationProxy._interval=t.setInterval(s,r)}}}),n.Application=function(e){var t=this;this.routes={},this.listeners=new n.Object({}),this.arounds=[],this.befores=[],this.namespace=(new Date).getTime()+"-"+parseInt(Math.random()*1e3,10),this.context_prototype=function(){n.EventContext.apply(this,arguments)},this.context_prototype.prototype=new n.EventContext,u(e)&&e.apply(this,[this]),this._location_proxy||this.setLocationProxy(new n.DefaultLocationProxy(this,this.run_interval_every)),this.debug&&this.bindToAllEvents(function(e,n){t.log(t.toString(),e.cleaned_type,n||{})})},n.Application.prototype=e.extend({},n.Object.prototype,{ROUTE_VERBS:["get","post","put","delete"],APP_EVENTS:["run","unload","lookup-route","run-route","route-found","event-context-before","event-context-after","changed","error","check-form-submission","redirect","location-changed"],_last_route:null,_location_proxy:null,_running:!1,element_selector:"body",debug:!1,raise_errors:!1,run_interval_every:50,disable_push_state:!1,template_engine:null,toString:function(){return"Sammy.Application:"+this.element_selector},$element:function(t){return t?e(this.element_selector).find(t):e(this.element_selector)},use:function(){var e=o(arguments),t=e.shift(),r=t||"";try{e.unshift(this),typeof t=="string"&&(r="Sammy."+t,t=n[t]),t.apply(this,e)}catch(i){typeof t=="undefined"?this.error("Plugin Error: called use() but plugin ("+r.toString()+") is not defined",i):u(t)?this.error("Plugin Error",i):this.error("Plugin Error: called use() but '"+r.toString()+"' is not a function",i)}return this},setLocationProxy:function(e){var t=this._location_proxy;this._location_proxy=e,this.isRunning()&&(t&&t.unbind(),this._location_proxy.bind())},log:function(){n.log.apply(n,Array.prototype.concat.apply([this.element_selector],arguments))},route:function(t,n,s){var o=this,a=[],f,l;!s&&u(n)&&(n=t,s=n,t="any"),t=t.toLowerCase();if(n.constructor==String){i.lastIndex=0;while((l=i.exec(n))!==null)a.push(l[1]);n=new RegExp(n.replace(i,r)+"$")}return typeof s=="string"&&(s=o[s]),f=function(e){var t={verb:e,path:n,callback:s,param_names:a};o.routes[e]=o.routes[e]||[],o.routes[e].push(t)},t==="any"?e.each(this.ROUTE_VERBS,function(e,t){f(t)}):f(t),this},get:p("get"),post:p("post"),put:p("put"),del:p("delete"),any:p("any"),mapRoutes:function(t){var n=this;return e.each(t,function(e,t){n.route.apply(n,t)}),this},eventNamespace:function(){return["sammy-app",this.namespace].join("-")},bind:function(e,t,n){var r=this;typeof n=="undefined"&&(n=t);var i=function(){var e,t,i;e=arguments[0],i=arguments[1],i&&i.context?(t=i.context,delete i.context):t=new r.context_prototype(r,"bind",e.type,i,e.target),e.cleaned_type=e.type.replace(r.eventNamespace(),""),n.apply(t,[e,i])};return this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(i),this.isRunning()&&this._listen(e,i),this},trigger:function(e,t){return this.$element().trigger([e,this.eventNamespace()].join("."),[t]),this},refresh:function(){return this.last_location=null,this.trigger("location-changed"),this},before:function(e,t){return u(e)&&(t=e,e={}),this.befores.push([e,t]),this},after:function(e){return this.bind("event-context-after",e)},around:function(e){return this.arounds.push(e),this},isRunning:function(){return this._running},helpers:function(t){return e.extend(this.context_prototype.prototype,t),this},helper:function(e,t){return this.context_prototype.prototype[e]=t,this},run:function(n){if(this.isRunning())return!1;var r=this;return e.each(this.listeners.toHash(),function(t,n){e.each(n,function(e,n){r._listen(t,n)})}),this.trigger("run",{start_url:n}),this._running=!0,this.last_location=null,!/\#(.+)/.test(this.getLocation())&&typeof n!="undefined"&&this.setLocation(n),this._checkLocation(),this._location_proxy.bind(),this.bind("location-changed",function(){r._checkLocation()}),this.bind("submit",function(t){var n=r._checkFormSubmission(e(t.target).closest("form"));return n===!1?t.preventDefault():!1}),e(t).bind("unload",function(){r.unload()}),this.trigger("changed")},unload:function(){if(!this.isRunning())return!1;var t=this;return this.trigger("unload"),this._location_proxy.unbind(),this.$element().unbind("submit").removeClass(t.eventNamespace()),e.each(this.listeners.toHash(),function(n,r){e.each(r,function(e,r){t._unlisten(n,r)})}),this._running=!1,this},bindToAllEvents:function(t){var n=this;return e.each(this.APP_EVENTS,function(e,r){n.bind(r,t)}),e.each(this.listeners.keys(!0),function(r,i){e.inArray(i,n.APP_EVENTS)==-1&&n.bind(i,t)}),this},routablePath:function(e){return e.replace(s,"")},lookupRoute:function(e,t){var n=this,r=!1,i=0,s,o;if(typeof this.routes[e]!="undefined"){s=this.routes[e].length;for(;i<s;i++){o=this.routes[e][i];if(n.routablePath(t).match(o.path)){r=o;break}}}return r},runRoute:function(t,n,r,i){var s=this,o=this.lookupRoute(t,n),u,a,f,c,h,p,d,v,m;this.log("runRoute",[t,n].join(" ")),this.trigger("run-route",{verb:t,path:n,params:r}),typeof r=="undefined"&&(r={}),e.extend(r,this._parseQueryString(n));if(o){this.trigger("route-found",{route:o}),(v=o.path.exec(this.routablePath(n)))!==null&&(v.shift(),e.each(v,function(e,t){o.param_names[e]?r[o.param_names[e]]=l(t):(r.splat||(r.splat=[]),r.splat.push(l(t)))})),u=new this.context_prototype(this,t,n,r,i),f=this.arounds.slice(0),h=this.befores.slice(0),d=[u].concat(r.splat),a=function(){var e;while(h.length>0){p=h.shift();if(s.contextMatchesOptions(u,p[0])){e=p[1].apply(u,[u]);if(e===!1)return!1}}return s.last_route=o,u.trigger("event-context-before",{context:u}),e=o.callback.apply(u,d),u.trigger("event-context-after",{context:u}),e},e.each(f.reverse(),function(e,t){var n=a;a=function(){return t.apply(u,[n])}});try{m=a()}catch(g){this.error(["500 Error",t,n].join(" "),g)}return m}return this.notFound(t,n)},contextMatchesOptions:function(t,n,r){var i=n;if(typeof i=="string"||f(i))i={path:i};typeof r=="undefined"&&(r=!0);if(e.isEmptyObject(i))return!0;if(a(i.path)){var s,o,u;s=[];for(o in i.path)u=e.extend({},i,{path:i.path[o]}),s.push(this.contextMatchesOptions(t,u));var l=e.inArray(!0,s)>-1?!0:!1;return r?l:!l}if(i.only)return this.contextMatchesOptions(t,i.only,!0);if(i.except)return this.contextMatchesOptions(t,i.except,!1);var c=!0,h=!0;return i.path&&(f(i.path)||(i.path=new RegExp(i.path.toString()+"$")),c=i.path.test(t.path)),i.verb&&(typeof i.verb=="string"?h=i.verb===t.verb:h=i.verb.indexOf(t.verb)>-1),r?h&&c:!h||!c},getLocation:function(){return this._location_proxy.getLocation()},setLocation:function(e){return this._location_proxy.setLocation(e)},swap:function(e,t){var n=this.$element().html(e);return u(t)&&t(e),n},templateCache:function(e,t){return typeof t!="undefined"?d[e]=t:d[e]},clearTemplateCache:function(){return d={}},notFound:function(e,t){var n=this.error(["404 Not Found",e,t].join(" "));return e==="get"?n:!0},error:function(e,t){t||(t=new Error),t.message=[e,t.message].join(" "),this.trigger("error",{message:t.message,error:t});if(this.raise_errors)throw t;this.log(t.message,t)},_checkLocation:function(){var e,t;e=this.getLocation();if(!this.last_location||this.last_location[0]!="get"||this.last_location[1]!=e)this.last_location=["get",e],t=this.runRoute("get",e);return t},_getFormVerb:function(t){var n=e(t),r,i;i=n.find('input[name="_method"]'),i.length>0&&(r=i.val()),r||(r=n[0].getAttribute("method"));if(!r||r=="")r="get";return e.trim(r.toString().toLowerCase())},_checkFormSubmission:function(t){var n,r,i,s,o;return this.trigger("check-form-submission",{form:t}),n=e(t),r=n.attr("action")||"",i=this._getFormVerb(n),this.log("_checkFormSubmission",n,r,i),i==="get"?(s=this._serializeFormParams(n),s!==""&&(r+="?"+s),this.setLocation(r),o=!1):(s=e.extend({},this._parseFormParams(n)),o=this.runRoute(i,r,s,t.get(0))),typeof o=="undefined"?!1:o},_serializeFormParams:function(e){var t="",n=e.serializeArray(),r;if(n.length>0){t=this._encodeFormPair(n[0].name,n[0].value);for(r=1;r<n.length;r++)t=t+"&"+this._encodeFormPair(n[r].name,n[r].value)}return t},_encodeFormPair:function(e,t){return c(e)+"="+c(t)},_parseFormParams:function(e){var t={},n=e.serializeArray(),r;for(r=0;r<n.length;r++)t=this._parseParamPair(t,n[r].name,n[r].value);return t},_parseQueryString:function(e){var t={},n,r,i,o;n=e.match(s);if(n&&n[1]){r=n[1].split("&");for(o=0;o<r.length;o++)i=r[o].split("="),t=this._parseParamPair(t,l(i[0]),l(i[1]||""))}return t},_parseParamPair:function(e,t,n){return typeof e[t]!="undefined"?a(e[t])?e[t].push(n):e[t]=[e[t],n]:e[t]=n,e},_listen:function(e,t){return this.$element().bind([e,this.eventNamespace()].join("."),t)},_unlisten:function(e,t){return this.$element().unbind([e,this.eventNamespace()].join("."),t)}}),n.RenderContext=function(e){this.event_context=e,this.callbacks=[],this.previous_content=null,this.content=null,this.next_engine=!1,this.waiting=!1},n.RenderContext.prototype=e.extend({},n.Object.prototype,{then:function(e){if(!u(e)){if(!(typeof e=="string"&&e in this.event_context))return this;var n=this.event_context[e];e=function(e){return n.apply(this.event_context,[e])}}var r=this;return this.waiting?this.callbacks.push(e):(this.wait(),t.setTimeout(function(){var t=e.apply(r,[r.content,r.previous_content]);t!==!1&&r.next(t)},0)),this},wait:function(){this.waiting=!0},next:function(e){this.waiting=!1,typeof e!="undefined"&&(this.previous_content=this.content,this.content=e),this.callbacks.length>0&&this.then(this.callbacks.shift())},load:function(t,n,r){var i=this;return this.then(function(){var s,o,a,f;u(n)?(r=n,n={}):n=e.extend({},n),r&&this.then(r);if(typeof t=="string")return a=t.match(/\.json$/)||n.json,s=a?n.cache===!0:n.cache!==!1,i.next_engine=i.event_context.engineFor(t),delete n.cache,delete n.json,n.engine&&(i.next_engine=n.engine,delete n.engine),s&&(o=this.event_context.app.templateCache(t))?o:(this.wait(),e.ajax(e.extend({url:t,data:{},dataType:a?"json":"text",type:"get",success:function(e){s&&i.event_context.app.templateCache(t,e),i.next(e)}},n)),!1);if(t.nodeType)return t.innerHTML;if(t.selector)return i.next_engine=t.attr("data-engine"),n.clone===!1?t.remove()[0].innerHTML.toString():t[0].innerHTML.toString()})},loadPartials:function(e){var t;if(e){this.partials=this.partials||{};for(t in e)(function(t,n){t.load(e[n]).then(function(e){this.partials[n]=e})})(this,t)}return this},render:function(e,t,n,r){return u(e)&&!t?this.then(e):(u(t)?(r=n,n=t,t=null):n&&!u(n)&&(r=n,n=null),this.loadPartials(r).load(e).interpolate(t,e).then(n))},partial:function(e,t,n,r){return u(n)?this.render(e,t,r).swap(n):u(t)?this.render(e,{},n).swap(t):this.render(e,t,n).swap()},send:function(){var e=this,t=o(arguments),n=t.shift();return a(t[0])&&(t=t[0]),this.then(function(r){return t.push(function(t){e.next(t)}),e.wait(),n.apply(n,t),!1})},collect:function(t,n,r){var i=this,s=function(){u(t)&&(n=t,t=this.content);var r=[],s=!1;return e.each(t,function(e,t){var o=n.apply(i,[e,t]);return o.jquery&&o.length==1&&(o=o[0],s=!0),r.push(o),o}),s?r:r.join("")};return r?s():this.then(s)},renderEach:function(t,n,r,i){return a(n)&&(i=r,r=n,n=null),this.load(t).then(function(s){var o=this;r||(r=a(this.previous_content)?this.previous_content:[]);if(!i)return this.collect(r,function(e,r){var i={},o=this.next_engine||t;return n?i[n]=r:i=r,this.event_context.interpolate(s,i,o)},!0);e.each(r,function(e,r){var u={},a=this.next_engine||t;n?u[n]=r:u=r,i(r,o.event_context.interpolate(s,u,a))})})},interpolate:function(e,t,n){var r=this;return this.then(function(i,s){!e&&s&&(e=s),this.next_engine&&(t=this.next_engine,this.next_engine=!1);var o=r.event_context.interpolate(i,e,t,this.partials);return n?s+o:o})},swap:function(e){return this.then(function(t){return this.event_context.swap(t,e),t}).trigger("changed",{})},appendTo:function(t){return this.then(function(n){e(t).append(n)}).trigger("changed",{})},prependTo:function(t){return this.then(function(n){e(t).prepend(n)}).trigger("changed",{})},replace:function(t){return this.then(function(n){e(t).html(n)}).trigger("changed",{})},trigger:function(e,t){return this.then(function(n){return typeof t=="undefined"&&(t={content:n}),this.event_context.trigger(e,t),n})}}),n.EventContext=function(e,t,r,i,s){this.app=e,this.verb=t,this.path=r,this.params=new n.Object(i),this.target=s},n.EventContext.prototype=e.extend({},n.Object.prototype,{$element:function(){return this.app.$element(o(arguments).shift())},engineFor:function(e){var t=this,n;if(u(e))return e;e=(e||t.app.template_engine).toString();if(n=e.match(/\.([^\.\?\#]+)$/))e=n[1];return e&&u(t[e])?t[e]:t.app.template_engine?this.engineFor(t.app.template_engine):function(e,t){return e}},interpolate:function(e,t,n,r){return this.engineFor(n).apply(this,[e,t,r])},render:function(e,t,r,i){return(new n.RenderContext(this)).render(e,t,r,i)},renderEach:function(e,t,r,i){return(new n.RenderContext(this)).renderEach(e,t,r,i)},load:function(e,t,r){return(new n.RenderContext(this)).load(e,t,r)},partial:function(e,t,r,i){return(new n.RenderContext(this)).partial(e,t,r,i)},send:function(){var e=new n.RenderContext(this);return e.send.apply(e,arguments)},redirect:function(){var t,n=o(arguments),r=this.app.getLocation(),i=n.length;if(i>1){var s=0,u=[],a=[],f={},l=!1;for(;s<i;s++)typeof n[s]=="string"?u.push(n[s]):(e.extend(f,n[s]),l=!0);t=u.join("/");if(l){for(var c in f)a.push(this.app._encodeFormPair(c,f[c]));t+="?"+a.join("&")}}else t=n[0];this.trigger("redirect",{to:t}),this.app.last_location=[this.verb,this.path],this.app.setLocation(t),(new RegExp(t)).test(r)&&this.app.trigger("location-changed")},trigger:function(e,t){return typeof t=="undefined"&&(t={}),t.context||(t.context=this),this.app.trigger(e,t)},eventNamespace:function(){return this.app.eventNamespace()},swap:function(e,t){return this.app.swap(e,t)},notFound:function(){return this.app.notFound(this.verb,this.path)},json:function(t){return e.parseJSON(t)},toString:function(){return"Sammy.EventContext: "+[this.verb,this.path,this.params].join(" ")}}),n})}(jQuery,window),function(){var e={};e.VERSION="1.0.beta.6",e.helpers={},e.partials={},e.registerHelper=function(e,t,n){n&&(t.not=n),this.helpers[e]=t},e.registerPartial=function(e,t){this.partials[e]=t},e.registerHelper("helperMissing",function(e){if(arguments.length===2)return undefined;throw new Error("Could not find property '"+e+"'")});var t=Object.prototype.toString,n="[object Function]";e.registerHelper("blockHelperMissing",function(e,r){var i=r.inverse||function(){},s=r.fn,o="",u=t.call(e);u===n&&(e=e.call(this));if(e===!0)return s(this);if(e===!1||e==null)return i(this);if(u==="[object Array]"){if(e.length>0)for(var a=0,f=e.length;a<f;a++)o+=s(e[a]);else o=i(this);return o}return s(e)}),e.registerHelper("each",function(e,t){var n=t.fn,r=t.inverse,i="";if(e&&e.length>0)for(var s=0,o=e.length;s<o;s++)i+=n(e[s]);else i=r(this);return i}),e.registerHelper("if",function(r,i){var s=t.call(r);return s===n&&(r=r.call(this)),!r||e.Utils.isEmpty(r)?i.inverse(this):i.fn(this)}),e.registerHelper("unless",function(t,n){var r=n.fn,i=n.inverse;return n.fn=i,n.inverse=r,e.helpers["if"].call(this,t,n)}),e.registerHelper("with",function(e,t){return t.fn(e)}),e.registerHelper("log",function(t){e.log(t)});var r=function(){var e={trace:function(){},yy:{},symbols_:{error:2,root:3,program:4,EOF:5,statements:6,simpleInverse:7,statement:8,openInverse:9,closeBlock:10,openBlock:11,mustache:12,partial:13,CONTENT:14,COMMENT:15,OPEN_BLOCK:16,inMustache:17,CLOSE:18,OPEN_INVERSE:19,OPEN_ENDBLOCK:20,path:21,OPEN:22,OPEN_UNESCAPED:23,OPEN_PARTIAL:24,params:25,hash:26,param:27,STRING:28,INTEGER:29,BOOLEAN:30,hashSegments:31,hashSegment:32,ID:33,EQUALS:34,pathSegments:35,SEP:36,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",14:"CONTENT",15:"COMMENT",16:"OPEN_BLOCK",18:"CLOSE",19:"OPEN_INVERSE",20:"OPEN_ENDBLOCK",22:"OPEN",23:"OPEN_UNESCAPED",24:"OPEN_PARTIAL",28:"STRING",29:"INTEGER",30:"BOOLEAN",33:"ID",34:"EQUALS",36:"SEP"},productions_:[0,[3,2],[4,3],[4,1],[4,0],[6,1],[6,2],[8,3],[8,3],[8,1],[8,1],[8,1],[8,1],[11,3],[9,3],[10,3],[12,3],[12,3],[13,3],[13,4],[7,2],[17,3],[17,2],[17,2],[17,1],[25,2],[25,1],[27,1],[27,1],[27,1],[27,1],[26,1],[31,2],[31,1],[32,3],[32,3],[32,3],[32,3],[21,1],[35,3],[35,1]],performAction:function(t,n,r,i,s,o,u){var a=o.length-1;switch(s){case 1:return o[a-1];case 2:this.$=new i.ProgramNode(o[a-2],o[a]);break;case 3:this.$=new i.ProgramNode(o[a]);break;case 4:this.$=new i.ProgramNode([]);break;case 5:this.$=[o[a]];break;case 6:o[a-1].push(o[a]),this.$=o[a-1];break;case 7:this.$=new i.InverseNode(o[a-2],o[a-1],o[a]);break;case 8:this.$=new i.BlockNode(o[a-2],o[a-1],o[a]);break;case 9:this.$=o[a];break;case 10:this.$=o[a];break;case 11:this.$=new i.ContentNode(o[a]);break;case 12:this.$=new i.CommentNode(o[a]);break;case 13:this.$=new i.MustacheNode(o[a-1][0],o[a-1][1]);break;case 14:this.$=new i.MustacheNode(o[a-1][0],o[a-1][1]);break;case 15:this.$=o[a-1];break;case 16:this.$=new i.MustacheNode(o[a-1][0],o[a-1][1]);break;case 17:this.$=new i.MustacheNode(o[a-1][0],o[a-1][1],!0);break;case 18:this.$=new i.PartialNode(o[a-1]);break;case 19:this.$=new i.PartialNode(o[a-2],o[a-1]);break;case 20:break;case 21:this.$=[[o[a-2]].concat(o[a-1]),o[a]];break;case 22:this.$=[[o[a-1]].concat(o[a]),null];break;case 23:this.$=[[o[a-1]],o[a]];break;case 24:this.$=[[o[a]],null];break;case 25:o[a-1].push(o[a]),this.$=o[a-1];break;case 26:this.$=[o[a]];break;case 27:this.$=o[a];break;case 28:this.$=new i.StringNode(o[a]);break;case 29:this.$=new i.IntegerNode(o[a]);break;case 30:this.$=new i.BooleanNode(o[a]);break;case 31:this.$=new i.HashNode(o[a]);break;case 32:o[a-1].push(o[a]),this.$=o[a-1];break;case 33:this.$=[o[a]];break;case 34:this.$=[o[a-2],o[a]];break;case 35:this.$=[o[a-2],new i.StringNode(o[a])];break;case 36:this.$=[o[a-2],new i.IntegerNode(o[a])];break;case 37:this.$=[o[a-2],new i.BooleanNode(o[a])];break;case 38:this.$=new i.IdNode(o[a]);break;case 39:o[a-2].push(o[a]),this.$=o[a-2];break;case 40:this.$=[o[a]]}},table:[{3:1,4:2,5:[2,4],6:3,8:4,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,11],22:[1,13],23:[1,14],24:[1,15]},{1:[3]},{5:[1,16]},{5:[2,3],7:17,8:18,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,19],20:[2,3],22:[1,13],23:[1,14],24:[1,15]},{5:[2,5],14:[2,5],15:[2,5],16:[2,5],19:[2,5],20:[2,5],22:[2,5],23:[2,5],24:[2,5]},{4:20,6:3,8:4,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,11],20:[2,4],22:[1,13],23:[1,14],24:[1,15]},{4:21,6:3,8:4,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,11],20:[2,4],22:[1,13],23:[1,14],24:[1,15]},{5:[2,9],14:[2,9],15:[2,9],16:[2,9],19:[2,9],20:[2,9],22:[2,9],23:[2,9],24:[2,9]},{5:[2,10],14:[2,10],15:[2,10],16:[2,10],19:[2,10],20:[2,10],22:[2,10],23:[2,10],24:[2,10]},{5:[2,11],14:[2,11],15:[2,11],16:[2,11],19:[2,11],20:[2,11],22:[2,11],23:[2,11],24:[2,11]},{5:[2,12],14:[2,12],15:[2,12],16:[2,12],19:[2,12],20:[2,12],22:[2,12],23:[2,12],24:[2,12]},{17:22,21:23,33:[1,25],35:24},{17:26,21:23,33:[1,25],35:24},{17:27,21:23,33:[1,25],35:24},{17:28,21:23,33:[1,25],35:24},{21:29,33:[1,25],35:24},{1:[2,1]},{6:30,8:4,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,11],22:[1,13],23:[1,14],24:[1,15]},{5:[2,6],14:[2,6],15:[2,6],16:[2,6],19:[2,6],20:[2,6],22:[2,6],23:[2,6],24:[2,6]},{17:22,18:[1,31],21:23,33:[1,25],35:24},{10:32,20:[1,33]},{10:34,20:[1,33]},{18:[1,35]},{18:[2,24],21:40,25:36,26:37,27:38,28:[1,41],29:[1,42],30:[1,43],31:39,32:44,33:[1,45],35:24},{18:[2,38],28:[2,38],29:[2,38],30:[2,38],33:[2,38],36:[1,46]},{18:[2,40],28:[2,40],29:[2,40],30:[2,40],33:[2,40],36:[2,40]},{18:[1,47]},{18:[1,48]},{18:[1,49]},{18:[1,50],21:51,33:[1,25],35:24},{5:[2,2],8:18,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,11],20:[2,2],22:[1,13],23:[1,14],24:[1,15]},{14:[2,20],15:[2,20],16:[2,20],19:[2,20],22:[2,20],23:[2,20],24:[2,20]},{5:[2,7],14:[2,7],15:[2,7],16:[2,7],19:[2,7],20:[2,7],22:[2,7],23:[2,7],24:[2,7]},{21:52,33:[1,25],35:24},{5:[2,8],14:[2,8],15:[2,8],16:[2,8],19:[2,8],20:[2,8],22:[2,8],23:[2,8],24:[2,8]},{14:[2,14],15:[2,14],16:[2,14],19:[2,14],20:[2,14],22:[2,14],23:[2,14],24:[2,14]},{18:[2,22],21:40,26:53,27:54,28:[1,41],29:[1,42],30:[1,43],31:39,32:44,33:[1,45],35:24},{18:[2,23]},{18:[2,26],28:[2,26],29:[2,26],30:[2,26],33:[2,26]},{18:[2,31],32:55,33:[1,56]},{18:[2,27],28:[2,27],29:[2,27],30:[2,27],33:[2,27]},{18:[2,28],28:[2,28],29:[2,28],30:[2,28],33:[2,28]},{18:[2,29],28:[2,29],29:[2,29],30:[2,29],33:[2,29]},{18:[2,30],28:[2,30],29:[2,30],30:[2,30],33:[2,30]},{18:[2,33],33:[2,33]},{18:[2,40],28:[2,40],29:[2,40],30:[2,40],33:[2,40],34:[1,57],36:[2,40]},{33:[1,58]},{14:[2,13],15:[2,13],16:[2,13],19:[2,13],20:[2,13],22:[2,13],23:[2,13],24:[2,13]},{5:[2,16],14:[2,16],15:[2,16],16:[2,16],19:[2,16],20:[2,16],22:[2,16],23:[2,16],24:[2,16]},{5:[2,17],14:[2,17],15:[2,17],16:[2,17],19:[2,17],20:[2,17],22:[2,17],23:[2,17],24:[2,17]},{5:[2,18],14:[2,18],15:[2,18],16:[2,18],19:[2,18],20:[2,18],22:[2,18],23:[2,18],24:[2,18]},{18:[1,59]},{18:[1,60]},{18:[2,21]},{18:[2,25],28:[2,25],29:[2,25],30:[2,25],33:[2,25]},{18:[2,32],33:[2,32]},{34:[1,57]},{21:61,28:[1,62],29:[1,63],30:[1,64],33:[1,25],35:24},{18:[2,39],28:[2,39],29:[2,39],30:[2,39],33:[2,39],36:[2,39]},{5:[2,19],14:[2,19],15:[2,19],16:[2,19],19:[2,19],20:[2,19],22:[2,19],23:[2,19],24:[2,19]},{5:[2,15],14:[2,15],15:[2,15],16:[2,15],19:[2,15],20:[2,15],22:[2,15],23:[2,15],24:[2,15]},{18:[2,34],33:[2,34]},{18:[2,35],33:[2,35]},{18:[2,36],33:[2,36]},{18:[2,37],33:[2,37]}],defaultActions:{16:[2,1],37:[2,23],53:[2,21]},parseError:function(t,n){throw new Error(t)},parse:function(t){function d(e){r.length=r.length-2*e,i.length=i.length-e,s.length=s.length-e}function v(){var e;return e=n.lexer.lex()||1,typeof e!="number"&&(e=n.symbols_[e]||e),e}var n=this,r=[0],i=[null],s=[],o=this.table,u="",a=0,f=0,l=0,c=2,h=1;this.lexer.setInput(t),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,typeof this.lexer.yylloc=="undefined"&&(this.lexer.yylloc={});var p=this.lexer.yylloc;s.push(p),typeof this.yy.parseError=="function"&&(this.parseError=this.yy.parseError);var m,g,y,b,w,E,S={},x,T,N,C;for(;;){y=r[r.length-1],this.defaultActions[y]?b=this.defaultActions[y]:(m==null&&(m=v()),b=o[y]&&o[y][m]);if(typeof b=="undefined"||!b.length||!b[0])if(!l){C=[];for(x in o[y])this.terminals_[x]&&x>2&&C.push("'"+this.terminals_[x]+"'");var k="";this.lexer.showPosition?k="Parse error on line "+(a+1)+":\n"+this.lexer.showPosition()+"\nExpecting "+C.join(", ")+", got '"+this.terminals_[m]+"'":k="Parse error on line "+(a+1)+": Unexpected "+(m==1?"end of input":"'"+(this.terminals_[m]||m)+"'"),this.parseError(k,{text:this.lexer.match,token:this.terminals_[m]||m,line:this.lexer.yylineno,loc:p,expected:C})}if(b[0]instanceof Array&&b.length>1)throw new Error("Parse Error: multiple actions possible at state: "+y+", token: "+m);switch(b[0]){case 1:r.push(m),i.push(this.lexer.yytext),s.push(this.lexer.yylloc),r.push(b[1]),m=null,g?(m=g,g=null):(f=this.lexer.yyleng,u=this.lexer.yytext,a=this.lexer.yylineno,p=this.lexer.yylloc,l>0&&l--);break;case 2:T=this.productions_[b[1]][1],S.$=i[i.length-T],S._$={first_line:s[s.length-(T||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(T||1)].first_column,last_column:s[s.length-1].last_column},E=this.performAction.call(S,u,f,a,this.yy,b[1],i,s);if(typeof E!="undefined")return E;T&&(r=r.slice(0,-1*T*2),i=i.slice(0,-1*T),s=s.slice(0,-1*T)),r.push(this.productions_[b[1]][0]),i.push(S.$),s.push(S._$),N=o[r[r.length-2]][r[r.length-1]],r.push(N);break;case 3:return!0}}return!0}},t=function(){var e={EOF:1,parseError:function(t,n){if(!this.yy.parseError)throw new Error(t);this.yy.parseError(t,n)},setInput:function(e){return this._input=e,this._more=this._less=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this},input:function(){var e=this._input[0];this.yytext+=e,this.yyleng++,this.match+=e,this.matched+=e;var t=e.match(/\n/);return t&&this.yylineno++,this._input=this._input.slice(1),e},unput:function(e){return this._input=e+this._input,this},more:function(){return this._more=!0,this},pastInput:function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?"...":"")+e.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var e=this.pastInput(),t=(new Array(e.length+1)).join("-");return e+this.upcomingInput()+"\n"+t+"^"},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,n,r;this._more||(this.yytext="",this.match="");var i=this._currentRules();for(var s=0;s<i.length;s++){t=this._input.match(this.rules[i[s]]);if(t){r=t[0].match(/\n.*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-1:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this._more=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],e=this.performAction.call(this,this.yy,this,i[s],this.conditionStack[this.conditionStack.length-1]);if(e)return e;return}}if(this._input==="")return this.EOF;this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return typeof t!="undefined"?t:this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.pop()},_currentRules:function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function(t){this.begin(t)}};return e.performAction=function(t,n,r,i){var s=i;switch(r){case 0:n.yytext.slice(-1)!=="\\"&&this.begin("mu"),n.yytext.slice(-1)==="\\"&&(n.yytext=n.yytext.substr(0,n.yyleng-1),this.begin("emu"));if(n.yytext)return 14;break;case 1:return 14;case 2:return this.popState(),14;case 3:return 24;case 4:return 16;case 5:return 20;case 6:return 19;case 7:return 19;case 8:return 23;case 9:return 23;case 10:return n.yytext=n.yytext.substr(3,n.yyleng-5),this.popState(),15;case 11:return 22;case 12:return 34;case 13:return 33;case 14:return 33;case 15:return 36;case 16:break;case 17:return this.popState(),18;case 18:return this.popState(),18;case 19:return n.yytext=n.yytext.substr(1,n.yyleng-2).replace(/\\"/g,'"'),28;case 20:return 30;case 21:return 30;case 22:return 29;case 23:return 33;case 24:return n.yytext=n.yytext.substr(1,n.yyleng-2),33;case 25:return"INVALID";case 26:return 5}},e.rules=[/^[^\x00]*?(?=(\{\{))/,/^[^\x00]+/,/^[^\x00]{2,}?(?=(\{\{))/,/^\{\{>/,/^\{\{#/,/^\{\{\//,/^\{\{\^/,/^\{\{\s*else\b/,/^\{\{\{/,/^\{\{&/,/^\{\{![\s\S]*?\}\}/,/^\{\{/,/^=/,/^\.(?=[} ])/,/^\.\./,/^[\/.]/,/^\s+/,/^\}\}\}/,/^\}\}/,/^"(\\["]|[^"])*"/,/^true(?=[}\s])/,/^false(?=[}\s])/,/^[0-9]+(?=[}\s])/,/^[a-zA-Z0-9_$-]+(?=[=}\s\/.])/,/^\[[^\]]*\]/,/^./,/^$/],e.conditions={mu:{rules:[3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26],inclusive:!1},emu:{rules:[2],inclusive:!1},INITIAL:{rules:[0,1,26],inclusive:!0}},e}();return e.lexer=t,e}();e.Parser=r,e.parse=function(t){return e.Parser.yy=e.AST,e.Parser.parse(t)},e.print=function(t){return(new e.PrintVisitor).accept(t)},e.logger={DEBUG:0,INFO:1,WARN:2,ERROR:3,level:3,log:function(e,t){}},e.log=function(t,n){e.logger.log(t,n)},function(){e.AST={},e.AST.ProgramNode=function(t,n){this.type="program",this.statements=t,n&&(this.inverse=new e.AST.ProgramNode(n))},e.AST.MustacheNode=function(e,t,n){this.type="mustache",this.id=e[0],this.params=e.slice(1),this.hash=t,this.escaped=!n},e.AST.PartialNode=function(e,t){this.type="partial",this.id=e,this.context=t};var t=function(t,n){if(t.original!==n.original)throw new e.Exception(t.original+" doesn't match "+n.original)};e.AST.BlockNode=function(e,n,r){t(e.id,r),this.type="block",this.mustache=e,this.program=n},e.AST.InverseNode=function(e,n,r){t(e.id,r),this.type="inverse",this.mustache=e,this.program=n},e.AST.ContentNode=function(e){this.type="content",this.string=e},e.AST.HashNode=function(e){this.type="hash",this.pairs=e},e.AST.IdNode=function(e){this.type="ID",this.original=e.join(".");var t=[],n=0;for(var r=0,i=e.length;r<i;r++){var s=e[r];s===".."?n++:s==="."||s==="this"?this.isScoped=!0:t.push(s)}this.parts=t,this.string=t.join("."),this.depth=n,this.isSimple=t.length===1&&n===0},e.AST.StringNode=function(e){this.type="STRING",this.string=e},e.AST.IntegerNode=function(e){this.type="INTEGER",this.integer=e},e.AST.BooleanNode=function(e){this.type="BOOLEAN",this.bool=e},e.AST.CommentNode=function(e){this.type="comment",this.comment=e}}(),e.Exception=function(e){var t=Error.prototype.constructor.apply(this,arguments);for(var n in t)t.hasOwnProperty(n)&&(this[n]=t[n]);this.message=t.message},e.Exception.prototype=new Error,e.SafeString=function(e){this.string=e},e.SafeString.prototype.toString=function(){return this.string.toString()},function(){var t={"<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},n=/&(?!\w+;)|[<>"'`]/g,r=/[&<>"'`]/,i=function(e){return t[e]||"&amp;"};e.Utils={escapeExpression:function(t){return t instanceof e.SafeString?t.toString():t==null||t===!1?"":r.test(t)?t.replace(n,i):t},isEmpty:function(e){return typeof e=="undefined"?!0:e===null?!0:e===!1?!0:Object.prototype.toString.call(e)==="[object Array]"&&e.length===0?!0:!1}}}(),e.Compiler=function(){},e.JavaScriptCompiler=function(){},function(t,n){t.OPCODE_MAP={appendContent:1,getContext:2,lookupWithHelpers:3,lookup:4,append:5,invokeMustache:6,appendEscaped:7,pushString:8,truthyOrFallback:9,functionOrFallback:10,invokeProgram:11,invokePartial:12,push:13,assignToHash:15,pushStringParam:16},t.MULTI_PARAM_OPCODES={appendContent:1,getContext:1,lookupWithHelpers:2,lookup:1,invokeMustache:3,pushString:1,truthyOrFallback:1,functionOrFallback:1,invokeProgram:3,invokePartial:1,push:1,assignToHash:1,pushStringParam:1},t.DISASSEMBLE_MAP={};for(var r in t.OPCODE_MAP){var i=t.OPCODE_MAP[r];t.DISASSEMBLE_MAP[i]=r}t.multiParamSize=function(e){return t.MULTI_PARAM_OPCODES[t.DISASSEMBLE_MAP[e]]},t.prototype={compiler:t,disassemble:function(){var e=this.opcodes,n,r,i=[],s,o,u;for(var a=0,f=e.length;a<f;a++){n=e[a];if(n==="DECLARE")o=e[++a],u=e[++a],i.push("DECLARE "+o+" = "+u);else{s=t.DISASSEMBLE_MAP[n];var l=t.multiParamSize(n),c=[];for(var h=0;h<l;h++)r=e[++a],typeof r=="string"&&(r='"'+r.replace("\n","\\n")+'"'),c.push(r);s=s+" "+c.join(" "),i.push(s)}}return i.join("\n")},guid:0,compile:function(e,t){this.children=[],this.depths={list:[]},this.options=t;var n=this.options.knownHelpers;this.options.knownHelpers={helperMissing:!0,blockHelperMissing:!0,each:!0,"if":!0,unless:!0,"with":!0,log:!0};if(n)for(var r in n)this.options.knownHelpers[r]=n[r];return this.program(e)},accept:function(e){return this[e.type](e)},program:function(e){var t=e.statements,n;this.opcodes=[];for(var r=0,i=t.length;r<i;r++)n=t[r],this[n.type](n);return this.isSimple=i===1,this.depths.list=this.depths.list.sort(function(e,t){return e-t}),this},compileProgram:function(e){var t=(new this.compiler).compile(e,this.options),n=this.guid++;this.usePartial=this.usePartial||t.usePartial,this.children[n]=t;for(var r=0,i=t.depths.list.length;r<i;r++){depth=t.depths.list[r];if(depth<2)continue;this.addDepth(depth-1)}return n},block:function(e){var t=e.mustache,n,r,i,s,o=this.setupStackForMustache(t),u=this.compileProgram(e.program);e.program.inverse&&(s=this.compileProgram(e.program.inverse),this.declare("inverse",s)),this.opcode("invokeProgram",u,o.length,!!t.hash),this.declare("inverse",null),this.opcode("append")},inverse:function(e){var t=this.setupStackForMustache(e.mustache),n=this.compileProgram(e.program);this.declare("inverse",n),this.opcode("invokeProgram",null,t.length,!!e.mustache.hash),this.declare("inverse",null),this.opcode("append")},hash:function(e){var t=e.pairs,n,r;this.opcode("push","{}");for(var i=0,s=t.length;i<s;i++)n=t[i],r=n[1],this.accept(r),this.opcode("assignToHash",n[0])},partial:function(e){var t=e.id;this.usePartial=!0,e.context?this.ID(e.context):this.opcode("push","depth0"),this.opcode("invokePartial",t.original),this.opcode("append")},content:function(e){this.opcode("appendContent",e.string)},mustache:function(e){var t=this.setupStackForMustache(e);this.opcode("invokeMustache",t.length,e.id.original,!!e.hash),e.escaped&&!this.options.noEscape?this.opcode("appendEscaped"):this.opcode("append")},ID:function(e){this.addDepth(e.depth),this.opcode("getContext",e.depth),this.opcode("lookupWithHelpers",e.parts[0]||null,e.isScoped||!1);for(var t=1,n=e.parts.length;t<n;t++)this.opcode("lookup",e.parts[t])},STRING:function(e){this.opcode("pushString",e.string)},INTEGER:function(e){this.opcode("push",e.integer)},BOOLEAN:function(e){this.opcode("push",e.bool)},comment:function(){},pushParams:function(e){var t=e.length,n;while(t--)n=e[t],this.options.stringParams?(n.depth&&this.addDepth(n.depth),this.opcode("getContext",n.depth||0),this.opcode("pushStringParam",n.string)):this[n.type](n)},opcode:function(e,n,r,i){this.opcodes.push(t.OPCODE_MAP[e]),n!==undefined&&this.opcodes.push(n),r!==undefined&&this.opcodes.push(r),i!==undefined&&this.opcodes.push(i)},declare:function(e,t){this.opcodes.push("DECLARE"),this.opcodes.push(e),this.opcodes.push(t)},addDepth:function(e){if(e===0)return;this.depths[e]||(this.depths[e]=!0,this.depths.list.push(e))},setupStackForMustache:function(e){var t=e.params;return this.pushParams(t),e.hash&&this.hash(e.hash),this.ID(e.id),t}},n.prototype={nameLookup:function(e,t,r){return/^[0-9]+$/.test(t)?e+"["+t+"]":n.isValidJavaScriptVariableName(t)?e+"."+t:e+"['"+t+"']"},appendToBuffer:function(e){return this.environment.isSimple?"return "+e+";":"buffer += "+e+";"},initializeBuffer:function(){return this.quotedString("")},namespace:"Handlebars",compile:function(e,t,n,r){this.environment=e,this.options=t||{},this.name=this.environment.name,this.isChild=!!n,this.context=n||{programs:[],aliases:{self:"this"},registers:{list:[]}},this.preamble(),this.stackSlot=0,this.stackVars=[],this.compileChildren(e,t);var i=e.opcodes,s;this.i=0;for(a=i.length;this.i<a;this.i++)s=this.nextOpcode(0),s[0]==="DECLARE"?(this.i=this.i+2,this[s[1]]=s[2]):(this.i=this.i+s[1].length,this[s[0]].apply(this,s[1]));return this.createFunctionContext(r)},nextOpcode:function(e){var n=this.environment.opcodes,r=n[this.i+e],i,s,o,u;if(r==="DECLARE")return i=n[this.i+1],s=n[this.i+2],["DECLARE",i,s];i=t.DISASSEMBLE_MAP[r],o=t.multiParamSize(r),u=[];for(var a=0;a<o;a++)u.push(n[this.i+a+1+e]);return[i,u]},eat:function(e){this.i=this.i+e.length},preamble:function(){var e=[];this.useRegister("foundHelper");if(!this.isChild){var t=this.namespace,n="helpers = helpers || "+t+".helpers;";this.environment.usePartial&&(n=n+" partials = partials || "+t+".partials;"),e.push(n)}else e.push("");this.environment.isSimple?e.push(""):e.push(", buffer = "+this.initializeBuffer()),this.lastContext=0,this.source=e},createFunctionContext:function(t){var n=this.stackVars;this.isChild||(n=n.concat(this.context.registers.list)),n.length>0&&(this.source[1]=this.source[1]+", "+n.join(", "));if(!this.isChild){var r=[];for(var i in this.context.aliases)this.source[1]=this.source[1]+", "+i+"="+this.context.aliases[i]}this.source[1]&&(this.source[1]="var "+this.source[1].substring(2)+";"),this.isChild||(this.source[1]+="\n"+this.context.programs.join("\n")+"\n"),this.environment.isSimple||this.source.push("return buffer;");var s=this.isChild?["depth0","data"]:["Handlebars","depth0","helpers","partials","data"];for(var o=0,u=this.environment.depths.list.length;o<u;o++)s.push("depth"+this.environment.depths.list[o]);if(t)return s.push(this.source.join("\n  ")),Function.apply(this,s);var a="function "+(this.name||"")+"("+s.join(",")+") {\n  "+this.source.join("\n  ")+"}";return e.log(e.logger.DEBUG,a+"\n\n"),a},appendContent:function(e){this.source.push(this.appendToBuffer(this.quotedString(e)))},append:function(){var e=this.popStack();this.source.push("if("+e+" || "+e+" === 0) { "+this.appendToBuffer(e)+" }"),this.environment.isSimple&&this.source.push("else { "+this.appendToBuffer("''")+" }")},appendEscaped:function(){var e=this.nextOpcode(1),t="";this.context.aliases.escapeExpression="this.escapeExpression",e[0]==="appendContent"&&(t=" + "+this.quotedString(e[1][0]),this.eat(e)),this.source.push(this.appendToBuffer("escapeExpression("+this.popStack()+")"+t))},getContext:function(e){this.lastContext!==e&&(this.lastContext=e)},lookupWithHelpers:function(e,t){if(e){var n=this.nextStack();this.usingKnownHelper=!1;var r;!t&&this.options.knownHelpers[e]?(r=n+" = "+this.nameLookup("helpers",e,"helper"),this.usingKnownHelper=!0):t||this.options.knownHelpersOnly?r=n+" = "+this.nameLookup("depth"+this.lastContext,e,"context"):(this.register("foundHelper",this.nameLookup("helpers",e,"helper")),r=n+" = foundHelper || "+this.nameLookup("depth"+this.lastContext,e,"context")),r+=";",this.source.push(r)}else this.pushStack("depth"+this.lastContext)},lookup:function(e){var t=this.topStack();this.source.push(t+" = ("+t+" === null || "+t+" === undefined || "+t+" === false ? "+t+" : "+this.nameLookup(t,e,"context")+");")},pushStringParam:function(e){this.pushStack("depth"+this.lastContext),this.pushString(e)},pushString:function(e){this.pushStack(this.quotedString(e))},push:function(e){this.pushStack(e)},invokeMustache:function(e,t,n){this.populateParams(e,this.quotedString(t),"{}",null,n,function(e,t,n){this.usingKnownHelper||(this.context.aliases.helperMissing="helpers.helperMissing",this.context.aliases.undef="void 0",this.source.push("else if("+n+"=== undef) { "+e+" = helperMissing.call("+t+"); }"),e!==n&&this.source.push("else { "+e+" = "+n+"; }"))})},invokeProgram:function(e,t,n){var r=this.programExpression(this.inverse),i=this.programExpression(e);this.populateParams(t,null,i,r,n,function(e,t,n){this.usingKnownHelper||(this.context.aliases.blockHelperMissing="helpers.blockHelperMissing",this.source.push("else { "+e+" = blockHelperMissing.call("+t+"); }"))})},populateParams:function(e,t,n,r,i,s){var o=i||this.options.stringParams||r||this.options.data,u=this.popStack(),a,f=[],l,c,h;o?(this.register("tmp1",n),h="tmp1"):h="{ hash: {} }";if(o){var p=i?this.popStack():"{}";this.source.push("tmp1.hash = "+p+";")}this.options.stringParams&&this.source.push("tmp1.contexts = [];");for(var d=0;d<e;d++)l=this.popStack(),f.push(l),this.options.stringParams&&this.source.push("tmp1.contexts.push("+this.popStack()+");");r&&(this.source.push("tmp1.fn = tmp1;"),this.source.push("tmp1.inverse = "+r+";")),this.options.data&&this.source.push("tmp1.data = data;"),f.push(h),this.populateCall(f,u,t||u,s,n!=="{}")},populateCall:function(e,t,n,r,i){var s=["depth0"].concat(e).join(", "),o=["depth0"].concat(n).concat(e).join(", "),u=this.nextStack();if(this.usingKnownHelper)this.source.push(u+" = "+t+".call("+s+");");else{this.context.aliases.functionType='"function"';var a=i?"foundHelper && ":"";this.source.push("if("+a+"typeof "+t+" === functionType) { "+u+" = "+t+".call("+s+"); }")}r.call(this,u,o,t),this.usingKnownHelper=!1},invokePartial:function(e){params=[this.nameLookup("partials",e,"partial"),"'"+e+"'",this.popStack(),"helpers","partials"],this.options.data&&params.push("data"),this.pushStack("self.invokePartial("+params.join(", ")+");")},assignToHash:function(e){var t=this.popStack(),n=this.topStack();this.source.push(n+"['"+e+"'] = "+t+";")},compiler:n,compileChildren:function(e,t){var n=e.children,r,i;for(var s=0,o=n.length;s<o;s++){r=n[s],i=new this.compiler,this.context.programs.push("");var u=this.context.programs.length;r.index=u,r.name="program"+u,this.context.programs[u]=i.compile(r,t,this.context)}},programExpression:function(e){if(e==null)return"self.noop";var t=this.environment.children[e],n=t.depths.list,r=[t.index,t.name,"data"];for(var i=0,s=n.length;i<s;i++)depth=n[i],depth===1?r.push("depth0"):r.push("depth"+(depth-1));return n.length===0?"self.program("+r.join(", ")+")":(r.shift(),"self.programWithDepth("+r.join(", ")+")")},register:function(e,t){this.useRegister(e),this.source.push(e+" = "+t+";")},useRegister:function(e){this.context.registers[e]||(this.context.registers[e]=!0,this.context.registers.list.push(e))},pushStack:function(e){return this.source.push(this.nextStack()+" = "+e+";"),"stack"+this.stackSlot},nextStack:function(){return this.stackSlot++,this.stackSlot>this.stackVars.length&&this.stackVars.push("stack"+this.stackSlot),"stack"+this.stackSlot},popStack:function(){return"stack"+this.stackSlot--},topStack:function(){return"stack"+this.stackSlot},quotedString:function(e){return'"'+e.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r")+'"'}};var s="break else new var case finally return void catch for switch while continue function this with default if throw delete in try do instanceof typeof abstract enum int short boolean export interface static byte extends long super char final native synchronized class float package throws const goto private transient debugger implements protected volatile double import public let yield".split(" "),o=n.RESERVED_WORDS={};for(var u=0,a=s.length;u<a;u++)o[s[u]]=!0;n.isValidJavaScriptVariableName=function(e){return!n.RESERVED_WORDS[e]&&/^[a-zA-Z_$][0-9a-zA-Z_$]+$/.test(e)?!0:!1}}(e.Compiler,e.JavaScriptCompiler),e.precompile=function(t,n){n=n||{};var r=e.parse(t),i=(new e.Compiler).compile(r,n);return(new e.JavaScriptCompiler).compile(i,n)},e.compile=function(t,n){function i(){var r=e.parse(t),i=(new e.Compiler).compile(r,n),s=(new e.JavaScriptCompiler).compile(i,n,undefined,!0);return e.template(s)}n=n||{};var r;return function(e,t){return r||(r=i()),r.call(this,e,t)}},e.VM={template:function(t){var n={escapeExpression:e.Utils.escapeExpression,invokePartial:e.VM.invokePartial,programs:[],program:function(t,n,r){var i=this.programs[t];return r?e.VM.program(n,r):i?i:(i=this.programs[t]=e.VM.program(n),i)},programWithDepth:e.VM.programWithDepth,noop:e.VM.noop};return function(r,i){return i=i||{},t.call(n,e,r,i.helpers,i.partials,i.data)}},programWithDepth:function(e,t,n){var r=Array.prototype.slice.call(arguments,2);return function(n,i){return i=i||{},e.apply(this,[n,i.data||t].concat(r))}},program:function(e,t){return function(n,r){return r=r||{},e(n,r.data||t)}},noop:function(){return""},invokePartial:function(t,n,r,i,s,o){options={helpers:i,partials:s,data:o};if(t===undefined)throw new e.Exception("The partial "+n+" could not be found");if(t instanceof Function)return t(r,options);if(!e.compile)throw new e.Exception("The partial "+n+" could not be compiled when running in runtime-only mode");return s[n]=e.compile(t),s[n](r,options)}},e.template=e.VM.template,define("Handlebars",[],function(){return e})}(),define("hbs/underscore",[],function(){function T(e,t,n){if(e===t)return e!==0||1/e==1/t;if(e==null||t==null)return e===t;e._chain&&(e=e._wrapped),t._chain&&(t=t._wrapped);if(e.isEqual&&w.isFunction(e.isEqual))return e.isEqual(t);if(t.isEqual&&w.isFunction(t.isEqual))return t.isEqual(e);var r=o.call(e);if(r!=o.call(t))return!1;switch(r){case"[object String]":return e==String(t);case"[object Number]":return e!=+e?t!=+t:e==0?1/e==1/t:e==+t;case"[object Date]":case"[object Boolean]":return+e==+t;case"[object RegExp]":return e.source==t.source&&e.global==t.global&&e.multiline==t.multiline&&e.ignoreCase==t.ignoreCase}if(typeof e!="object"||typeof t!="object")return!1;var i=n.length;while(i--)if(n[i]==e)return!0;n.push(e);var s=0,u=!0;if(r=="[object Array]"){s=e.length,u=s==t.length;if(u)while(s--)if(!(u=s in e==s in t&&T(e[s],t[s],n)))break}else{if("constructor"in e!="constructor"in t||e.constructor!=t.constructor)return!1;for(var a in e)if(w.has(e,a)){s++;if(!(u=w.has(t,a)&&T(e[a],t[a],n)))break}if(u){for(a in t)if(w.has(t,a)&&!(s--))break;u=!s}}return n.pop(),u}var e={},t=Array.prototype,n=Object.prototype,r=Function.prototype,i=t.slice,s=t.unshift,o=n.toString,u=n.hasOwnProperty,a=t.forEach,f=t.map,l=t.reduce,c=t.reduceRight,h=t.filter,p=t.every,d=t.some,v=t.indexOf,m=t.lastIndexOf,g=Array.isArray,y=Object.keys,b=r.bind,w=function(e){return new _(e)};w.VERSION="1.3.3";var E=w.each=w.forEach=function(t,n,r){if(t==null)return;if(a&&t.forEach===a)t.forEach(n,r);else if(t.length===+t.length){for(var i=0,s=t.length;i<s;i++)if(i in t&&n.call(r,t[i],i,t)===e)return}else for(var o in t)if(w.has(t,o)&&n.call(r,t[o],o,t)===e)return};w.map=w.collect=function(e,t,n){var r=[];return e==null?r:f&&e.map===f?e.map(t,n):(E(e,function(e,i,s){r[r.length]=t.call(n,e,i,s)}),e.length===+e.length&&(r.length=e.length),r)},w.reduce=w.foldl=w.inject=function(e,t,n,r){var i=arguments.length>2;e==null&&(e=[]);if(l&&e.reduce===l)return r&&(t=w.bind(t,r)),i?e.reduce(t,n):e.reduce(t);E(e,function(e,s,o){i?n=t.call(r,n,e,s,o):(n=e,i=!0)});if(!i)throw new TypeError("Reduce of empty array with no initial value");return n},w.reduceRight=w.foldr=function(e,t,n,r){var i=arguments.length>2;e==null&&(e=[]);if(c&&e.reduceRight===c)return r&&(t=w.bind(t,r)),i?e.reduceRight(t,n):e.reduceRight(t);var s=w.toArray(e).reverse();return r&&!i&&(t=w.bind(t,r)),i?w.reduce(s,t,n,r):w.reduce(s,t)},w.find=w.detect=function(e,t,n){var r;return S(e,function(e,i,s){if(t.call(n,e,i,s))return r=e,!0}),r},w.filter=w.select=function(e,t,n){var r=[];return e==null?r:h&&e.filter===h?e.filter(t,n):(E(e,function(e,i,s){t.call(n,e,i,s)&&(r[r.length]=e)}),r)},w.reject=function(e,t,n){var r=[];return e==null?r:(E(e,function(e,i,s){t.call(n,e,i,s)||(r[r.length]=e)}),r)},w.every=w.all=function(t,n,r){var i=!0;return t==null?i:p&&t.every===p?t.every(n,r):(E(t,function(t,s,o){if(!(i=i&&n.call(r,t,s,o)))return e}),!!i)};var S=w.some=w.any=function(t,n,r){n||(n=w.identity);var i=!1;return t==null?i:d&&t.some===d?t.some(n,r):(E(t,function(t,s,o){if(i||(i=n.call(r,t,s,o)))return e}),!!i)};w.include=w.contains=function(e,t){var n=!1;return e==null?n:v&&e.indexOf===v?e.indexOf(t)!=-1:(n=S(e,function(e){return e===t}),n)},w.invoke=function(e,t){var n=i.call(arguments,2);return w.map(e,function(e){return(w.isFunction(t)?t||e:e[t]).apply(e,n)})},w.pluck=function(e,t){return w.map(e,function(e){return e[t]})},w.max=function(e,t,n){if(!t&&w.isArray(e)&&e[0]===+e[0])return Math.max.apply(Math,e);if(!t&&w.isEmpty(e))return-Infinity;var r={computed:-Infinity};return E(e,function(e,i,s){var o=t?t.call(n,e,i,s):e;o>=r.computed&&(r={value:e,computed:o})}),r.value},w.min=function(e,t,n){if(!t&&w.isArray(e)&&e[0]===+e[0])return Math.min.apply(Math,e);if(!t&&w.isEmpty(e))return Infinity;var r={computed:Infinity};return E(e,function(e,i,s){var o=t?t.call(n,e,i,s):e;o<r.computed&&(r={value:e,computed:o})}),r.value},w.shuffle=function(e){var t=[],n;return E(e,function(e,r,i){n=Math.floor(Math.random()*(r+1)),t[r]=t[n],t[n]=e}),t},w.sortBy=function(e,t,n){var r=w.isFunction(t)?t:function(e){return e[t]};return w.pluck(w.map(e,function(e,t,i){return{value:e,criteria:r.call(n,e,t,i)}}).sort(function(e,t){var n=e.criteria,r=t.criteria;return n===void 0?1:r===void 0?-1:n<r?-1:n>r?1:0}),"value")},w.groupBy=function(e,t){var n={},r=w.isFunction(t)?t:function(e){return e[t]};return E(e,function(e,t){var i=r(e,t);(n[i]||(n[i]=[])).push(e)}),n},w.sortedIndex=function(e,t,n){n||(n=w.identity);var r=0,i=e.length;while(r<i){var s=r+i>>1;n(e[s])<n(t)?r=s+1:i=s}return r},w.toArray=function(e){return e?w.isArray(e)?i.call(e):w.isArguments(e)?i.call(e):e.toArray&&w.isFunction(e.toArray)?e.toArray():w.values(e):[]},w.size=function(e){return w.isArray(e)?e.length:w.keys(e).length},w.first=w.head=w.take=function(e,t,n){return t!=null&&!n?i.call(e,0,t):e[0]},w.initial=function(e,t,n){return i.call(e,0,e.length-(t==null||n?1:t))},w.last=function(e,t,n){return t!=null&&!n?i.call(e,Math.max(e.length-t,0)):e[e.length-1]},w.rest=w.tail=function(e,t,n){return i.call(e,t==null||n?1:t)},w.compact=function(e){return w.filter(e,function(e){return!!e})},w.flatten=function(e,t){return w.reduce(e,function(e,n){return w.isArray(n)?e.concat(t?n:w.flatten(n)):(e[e.length]=n,e)},[])},w.without=function(e){return w.difference(e,i.call(arguments,1))},w.uniq=w.unique=function(e,t,n){var r=n?w.map(e,n):e,i=[];return e.length<3&&(t=!0),w.reduce(r,function(n,r,s){if(t?w.last(n)!==r||!n.length:!w.include(n,r))n.push(r),i.push(e[s]);return n},[]),i},w.union=function(){return w.uniq(w.flatten(arguments,!0))},w.intersection=w.intersect=function(e){var t=i.call(arguments,1);return w.filter(w.uniq(e),function(e){return w.every(t,function(t){return w.indexOf(t,e)>=0})})},w.difference=function(e){var t=w.flatten(i.call(arguments,1),!0);return w.filter(e,function(e){return!w.include(t,e)})},w.zip=function(){var e=i.call(arguments),t=w.max(w.pluck(e,"length")),n=new Array(t);for(var r=0;r<t;r++)n[r]=w.pluck(e,""+r);return n},w.indexOf=function(e,t,n){if(e==null)return-1;var r,i;if(n)return r=w.sortedIndex(e,t),e[r]===t?r:-1;if(v&&e.indexOf===v)return e.indexOf(t);for(r=0,i=e.length;r<i;r++)if(r in e&&e[r]===t)return r;return-1},w.lastIndexOf=function(e,t){if(e==null)return-1;if(m&&e.lastIndexOf===m)return e.lastIndexOf(t);var n=e.length;while(n--)if(n in e&&e[n]===t)return n;return-1},w.range=function(e,t,n){arguments.length<=1&&(t=e||0,e=0),n=arguments[2]||1;var r=Math.max(Math.ceil((t-e)/n),0),i=0,s=new Array(r);while(i<r)s[i++]=e,e+=n;return s};var x=function(){};w.bind=function(t,n){var r,s;if(t.bind===b&&b)return b.apply(t,i.call(arguments,1));if(!w.isFunction(t))throw new TypeError;return s=i.call(arguments,2),r=function(){if(this instanceof r){x.prototype=t.prototype;var e=new x,o=t.apply(e,s.concat(i.call(arguments)));return Object(o)===o?o:e}return t.apply(n,s.concat(i.call(arguments)))}},w.bindAll=function(e){var t=i.call(arguments,1);return t.length==0&&(t=w.functions(e)),E(t,function(t){e[t]=w.bind(e[t],e)}),e},w.memoize=function(e,t){var n={};return t||(t=w.identity),function(){var r=t.apply(this,arguments);return w.has(n,r)?n[r]:n[r]=e.apply(this,arguments)}},w.delay=function(e,t){var n=i.call(arguments,2);return setTimeout(function(){return e.apply(null,n)},t)},w.defer=function(e){return w.delay.apply(w,[e,1].concat(i.call(arguments,1)))},w.throttle=function(e,t){var n,r,i,s,o,u,a=w.debounce(function(){o=s=!1},t);return function(){n=this,r=arguments;var f=function(){i=null,o&&e.apply(n,r),a()};return i||(i=setTimeout(f,t)),s?o=!0:u=e.apply(n,r),a(),s=!0,u}},w.debounce=function(e,t,n){var r;return function(){var i=this,s=arguments,o=function(){r=null,n||e.apply(i,s)};n&&!r&&e.apply(i,s),clearTimeout(r),r=setTimeout(o,t)}},w.once=function(e){var t=!1,n;return function(){return t?n:(t=!0,n=e.apply(this,arguments))}},w.wrap=function(e,t){return function(){var n=[e].concat(i.call(arguments,0));return t.apply(this,n)}},w.compose=function(){var e=arguments;return function(){var t=arguments;for(var n=e.length-1;n>=0;n--)t=[e[n].apply(this,t)];return t[0]}},w.after=function(e,t){return e<=0?t():function(){if(--e<1)return t.apply(this,arguments)}},w.keys=y||function(e){if(e!==Object(e))throw new TypeError("Invalid object");var t=[];for(var n in e)w.has(e,n)&&(t[t.length]=n);return t},w.values=function(e){return w.map(e,w.identity)},w.functions=w.methods=function(e){var t=[];for(var n in e)w.isFunction(e[n])&&t.push(n);return t.sort()},w.extend=function(e){return E(i.call(arguments,1),function(t){for(var n in t)e[n]=t[n]}),e},w.pick=function(e){var t={};return E(w.flatten(i.call(arguments,1)),function(n){n in e&&(t[n]=e[n])}),t},w.defaults=function(e){return E(i.call(arguments,1),function(t){for(var n in t)e[n]==null&&(e[n]=t[n])}),e},w.clone=function(e){return w.isObject(e)?w.isArray(e)?e.slice():w.extend({},e):e},w.tap=function(e,t){return t(e),e},w.isEqual=function(e,t){return T(e,t,[])},w.isEmpty=function(e){if(e==null)return!0;if(w.isArray(e)||w.isString(e))return e.length===0;for(var t in e)if(w.has(e,t))return!1;return!0},w.isElement=function(e){return!!e&&e.nodeType==1},w.isArray=g||function(e){return o.call(e)=="[object Array]"},w.isObject=function(e){return e===Object(e)},w.isArguments=function(e){return o.call(e)=="[object Arguments]"},w.isArguments(arguments)||(w.isArguments=function(e){return!!e&&!!w.has(e,"callee")}),w.isFunction=function(e){return o.call(e)=="[object Function]"},w.isString=function(e){return o.call(e)=="[object String]"},w.isNumber=function(e){return o.call(e)=="[object Number]"},w.isFinite=function(e){return w.isNumber(e)&&isFinite(e)},w.isNaN=function(e){return e!==e},w.isBoolean=function(e){return e===!0||e===!1||o.call(e)=="[object Boolean]"},w.isDate=function(e){return o.call(e)=="[object Date]"},w.isRegExp=function(e){return o.call(e)=="[object RegExp]"},w.isNull=function(e){return e===null},w.isUndefined=function(e){return e===void 0},w.has=function(e,t){return u.call(e,t)},w.noConflict=function(){return root._=previousUnderscore,this},w.identity=function(e){return e},w.times=function(e,t,n){for(var r=0;r<e;r++)t.call(n,r)},w.escape=function(e){return(""+e).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;").replace(/\//g,"&#x2F;")},w.result=function(e,t){if(e==null)return null;var n=e[t];return w.isFunction(n)?n.call(e):n},w.mixin=function(e){E(w.functions(e),function(t){P(t,w[t]=e[t])})};var N=0;w.uniqueId=function(e){var t=N++;return e?e+t:t},w.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var C=/.^/,k={"\\":"\\","'":"'",r:"\r",n:"\n",t:"	",u2028:"\u2028",u2029:"\u2029"};for(var L in k)k[k[L]]=L;var A=/\\|'|\r|\n|\t|\u2028|\u2029/g,O=/\\(\\|'|r|n|t|u2028|u2029)/g,M=function(e){return e.replace(O,function(e,t){return k[t]})};w.template=function(e,t,n){n=w.defaults(n||{},w.templateSettings);var r="__p+='"+e.replace(A,function(e){return"\\"+k[e]}).replace(n.escape||C,function(e,t){return"'+\n_.escape("+M(t)+")+\n'"}).replace(n.interpolate||C,function(e,t){return"'+\n("+M(t)+")+\n'"}).replace(n.evaluate||C,function(e,t){return"';\n"+M(t)+"\n;__p+='"})+"';\n";n.variable||(r="with(obj||{}){\n"+r+"}\n"),r="var __p='';var print=function(){__p+=Array.prototype.join.call(arguments, '')};\n"+r+"return __p;\n";var i=new Function(n.variable||"obj","_",r);if(t)return i(t,w);var s=function(e){return i.call(this,e,w)};return s.source="function("+(n.variable||"obj")+"){\n"+r+"}",s},w.chain=function(e){return w(e).chain()};var _=function(e){this._wrapped=e};w.prototype=_.prototype;var D=function(e,t){return t?w(e).chain():e},P=function(e,t){_.prototype[e]=function(){var e=i.call(arguments);return s.call(e,this._wrapped),D(t.apply(w,e),this._chain)}};return w.mixin(w),E(["pop","push","reverse","shift","sort","splice","unshift"],function(e){var n=t[e];_.prototype[e]=function(){var t=this._wrapped;n.apply(t,arguments);var r=t.length;return(e=="shift"||e=="splice")&&r===0&&delete t[0],D(t,this._chain)}}),E(["concat","join","slice"],function(e){var n=t[e];_.prototype[e]=function(){return D(n.apply(this._wrapped,arguments),this._chain)}}),_.prototype.chain=function(){return this._chain=!0,this},_.prototype.value=function(){return this._wrapped},w}),define("hbs/i18nprecompile",["Handlebars","./underscore"],function(e,t){function n(r,i,s){return s=s||{},i=i||{},r&&r.type==="program"&&r.statements&&(t(r.statements).forEach(function(t,o){var u="<!-- i18n error -->";if(t.type=="mustache"&&t.id&&t.id.original=="$"){if(t.params.length&&t.params[0].string){var a=t.params[0].string;u=i[a]||(s.originalKeyFallback?a:u)}r.statements[o]=new e.AST.ContentNode(u)}else t.program&&(t.program=n(t.program,i,s))}),r.inverse&&n(r.inverse,i,s)),r}return function(t,r,i){i=i||{};var s,o;return s=e.parse(t),r!==!1&&(s=n(s,r,i)),o=(new e.Compiler).compile(s,i),(new e.JavaScriptCompiler).compile(o,i)}}),function(window){var JSON=window.JSON||{};(function(){function f(e){return e<10?"0"+e:e}function quote(e){return escapable.lastIndex=0,escapable.test(e)?'"'+e.replace(escapable,function(e){var t=meta[e];return typeof t=="string"?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+e+'"'}function str(e,t){var n,r,i,s,o=gap,u,a=t[e];a&&typeof a=="object"&&typeof a.toJSON=="function"&&(a=a.toJSON(e)),typeof rep=="function"&&(a=rep.call(t,e,a));switch(typeof a){case"string":return quote(a);case"number":return isFinite(a)?String(a):"null";case"boolean":case"null":return String(a);case"object":if(!a)return"null";gap+=indent,u=[];if(Object.prototype.toString.apply(a)==="[object Array]"){s=a.length;for(n=0;n<s;n+=1)u[n]=str(n,a)||"null";return i=u.length===0?"[]":gap?"[\n"+gap+u.join(",\n"+gap)+"\n"+o+"]":"["+u.join(",")+"]",gap=o,i}if(rep&&typeof rep=="object"){s=rep.length;for(n=0;n<s;n+=1)typeof rep[n]=="string"&&(r=rep[n],i=str(r,a),i&&u.push(quote(r)+(gap?": ":":")+i))}else for(r in a)Object.prototype.hasOwnProperty.call(a,r)&&(i=str(r,a),i&&u.push(quote(r)+(gap?": ":":")+i));return i=u.length===0?"{}":gap?"{\n"+gap+u.join(",\n"+gap)+"\n"+o+"}":"{"+u.join(",")+"}",gap=o,i}}typeof Date.prototype.toJSON!="function"&&(Date.prototype.toJSON=function(e){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null},String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(e){return this.valueOf()});var cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,escapable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta={"\b":"\\b","	":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},rep;typeof JSON.stringify!="function"&&(JSON.stringify=function(e,t,n){var r;gap="",indent="";if(typeof n=="number")for(r=0;r<n;r+=1)indent+=" ";else typeof n=="string"&&(indent=n);rep=t;if(!t||typeof t=="function"||typeof t=="object"&&typeof t.length=="number")return str("",{"":e});throw new Error("JSON.stringify")}),typeof JSON.parse!="function"&&(JSON.parse=function(text,reviver){function walk(e,t){var n,r,i=e[t];if(i&&typeof i=="object")for(n in i)Object.prototype.hasOwnProperty.call(i,n)&&(r=walk(i,n),r!==undefined?i[n]=r:delete i[n]);return reviver.call(e,t,i)}var j;text=String(text),cx.lastIndex=0,cx.test(text)&&(text=text.replace(cx,function(e){return"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)}));if(/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return j=eval("("+text+")"),typeof reviver=="function"?walk({"":j},""):j;throw new SyntaxError("JSON.parse")})})(),define("hbs/json2",[],function(){return JSON})}.call(this,this),define("hbs",["Handlebars","./hbs/underscore","./hbs/i18nprecompile","./hbs/json2"],function(e,t,n,r){var i,s,o=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"],u=function(){throw new Error("Environment unsupported.")},a=[],f="w+",l="hbs",c="@hbs",h="/demo/styles/",p="/demo-build/styles/",d="template/helpers/",v="template/i18n/",m="screen.build.css";typeof window!="undefined"&&window.navigator&&window.document&&!window.navigator.userAgent.match(/Node.js/)?(s=function(){var e,t,n;if(typeof XMLHttpRequest!="undefined")return new XMLHttpRequest;for(t=0;t<3;t++){n=o[t];try{e=new ActiveXObject(n)}catch(r){}if(e){o=[n];break}}if(!e)throw new Error("getXhr(): XMLHttpRequest not available");return e},u=function(e,t){var n=s();n.open("GET",e,!0),n.onreadystatechange=function(e){n.readyState===4&&t(n.responseText)},n.send(null)}):typeof process!="undefined"&&process.versions&&!!process.versions.node?(i=require.nodeRequire("fs"),u=function(e,t){t(i.readFileSync(e,"utf8"))}):typeof java!="undefined"&&typeof java.io!="undefined"&&(u=function(e,t){var n=new java.io.File(e),r=new java.io.FileReader(n),i=new java.io.BufferedReader(r),s,o="";while((s=i.readLine())!==null)o+=new String(s)+"\n";i.close(),t(o)});var g={},y=function(e,t){g[e]?t(g[e]):u(e,function(n){g[e]=n,t.call(this,n)})},b=[],w={};return{get:function(){return e},write:function(e,t,n){if(t+c in a){var r=a[t+c];n.asModule(e+"!"+t,r)}},version:"1.0.3beta",load:function(i,s,o,g){function T(e,n){return t(e).forEach(function(e){e&&e.type&&e.type==="partial"&&n.push(e.id.string),e&&e.program&&e.program.statements&&T(e.program.statements,n),e&&e.program&&e.program.inverse&&e.program.inverse.statements&&T(e.program.inverse.statements,n)}),n}function N(e){var n=[];return e&&e.statements&&(n=T(e.statements,[])),t(n).unique()}function C(e){var t,n,i;if(e&&e.statements){t=e.statements[0];if(t.type==="comment")try{return n=t.comment.replace(new RegExp("^[\\s]+|[\\s]+$","g"),""),i=r.parse(n),n}catch(s){return"{}"}}return"{}"}function k(e){if(!e)return[];var t=[e[0]],n=e[0],r;for(r=1;r<e.length;++r)e.hasOwnProperty(r)&&(n+="."+e[r],t.push(n));return t}function L(e,n,r,i){r=r?r+".":"";var s="",o=!1;return t(e).forEach(function(e){var o,u,a;if(e&&e.type&&e.type==="mustache"){if(!e.params||!e.params.length){o=k(e.id.parts);for(u in o)o[u]&&(s=o[u]||s,n.push(r+o[u]));n.push(r+e.id.string)}var f=["this",".",".."];e.params&&t(e.params).forEach(function(u){t(f).contains(u.original)&&i.push(e.id.string),o=k(u.parts);for(var a in o)o[a]&&(s=o[a]||s,i.push(e.id.string),n.push(r+o[a]))})}e&&e.mustache&&L([e.mustache],n,r+s,i),e&&e.program&&e.program.statements&&(a=L([e.mustache],[],"",i)[0]||"",L(e.program.statements,n,r+s+(a?r+s?"."+a:a:""),i))}),n}function A(e){var n=[],r=[];e&&e.statements&&(n=L(e.statements,[],undefined,r));var i=["helperMissing","blockHelperMissing","each","if","unless","with"];return{vars:t(n).chain().unique().map(function(e){return e===""?".":e.length&&e[e.length-1]==="."?e.substr(0,e.length-1)+"[]":e}).value(),helpers:t(r).chain().unique().map(function(e){return t(i).contains(e)?undefined:e}).compact().value()}}function O(l){u(M,function(u){var c=e.parse(u),v=N(c),y=C(c),x=A(c),T=x.vars,k=x.helpers||[],L=v.join("', 'hbs!").replace(/_/g,"/"),O=g.hbs&&g.hbs.disableHelpers?"":function(){var e,t=[],n=g.hbs&&g.hbs.helperPathCallback?g.hbs.helperPathCallback:function(e){return(g.hbs&&g.hbs.helperDirectory?g.hbs.helperDirectory:d)+e};for(e=0;e<k.length;e++)t[e]="'"+n(k[e])+"'";return t}().join(","),D="",P="",H="",B,j,F;L&&(L=",'hbs!"+L+"'"),O&&(O=","+O);if(y!=="{}")try{B=r.parse(y),B&&B.styles&&(b=t.union(b,B.styles),require.isBrowser&&!g.isBuild?(j=document.head||document.getElementsByTagName("head")[0],t(B.styles).forEach(function(e){w[e]||(F=document.createElement("link"),F.href=g.baseUrl+h+e+".css",F.media="all",F.rel="stylesheet",F.type="text/css",j.appendChild(F),w[e]=F)})):g.isBuild&&function(){var e=require.nodeRequire("fs"),n=t(B.styles).map(function(e){return w[e]?"":(w[e]=!0,"@import url("+p+e+".css);\n")}).join("\n");e.open(__dirname+p+m,f,"0666",function(t,r){e.writeSync(r,n,null,encoding="utf8"),e.close(r)}),f="a"}())}catch(I){console.log("error injecting styles")}!g.isBuild&&!g.serverRender&&(D="<!-- START - "+i+" -->",P="<!-- END - "+i+" -->",H="t.meta = "+y+";\n"+"t.helpers = "+r.stringify(k)+";\n"+"t.deps = "+r.stringify(v)+";\n"+"t.vars = "+r.stringify(T)+";\n");var q=S?!1:t.extend(l,g.localeMapping),R=n(u,q,{originalKeyFallback:(g.hbs||{}).originalKeyFallback});u="/* START_TEMPLATE */\ndefine(['hbs','Handlebars'"+L+O+"], function( hbs, Handlebars ){ \n"+"var t = Handlebars.template("+R+");\n"+"Handlebars.registerPartial('"+i.replace(/\//g,"_")+"', t);\n"+H+"return t;\n"+"});\n"+"/* END_TEMPLATE */\n",g.isBuild&&(a[E]=u),g.isBuild||(u+="\r\n//@ sourceURL="+M);for(var U in v)v.hasOwnProperty(U)&&(v[U]="hbs!"+v[U].replace(/_/g,"/"));g.isBuild?(o.fromText(E,u),s([E],function(e){o(e)})):require(v,function(){o.fromText(E,u),s([E],function(e){o(e)})})})}var E=i+c,S=g.hbs&&g.hbs.disableI18n,x=[],M=s.toUrl(i+"."+(g.hbs&&g.hbs.templateExtension?g.hbs.templateExtension:l));S?O(!1):y(s.toUrl((g.hbs&&g.hbs.i18nDirectory?g.hbs.i18nDirectory:v)+(g.locale||"en_us")+".json"),function(e){O(r.parse(e))})}}}),define("hbs!views/createRegistration",["hbs","Handlebars"],function(e,t){var n=t.template(function(e,t,n,r,i){n=n||e.helpers;var s,o=this;return'﻿<form class="form-horizontal"  data-bind="jqmsubmit: createRegistration">\r\n  <div class="modal-header">\r\n    <button type="button" class="close" data-dismiss="modal">×</button>\r\n    <h3>Registration details</h3>\r\n  </div>\r\n  <div class="modal-body" data-bind="with: properties">\r\n\r\n    <div class="control-group">\r\n      <label class="control-label" for="input01">First name</label>\r\n      <div class="controls">\r\n        <input type="text" class="input-xlarge" id="input01" data-bind="value: FirstName" required="" />\r\n      </div>\r\n    </div>\r\n    <div class="control-group">\r\n      <label class="control-label" for="input02">Last name</label>\r\n      <div class="controls">\r\n        <input type="text" class="input-xlarge" id="input02" data-bind="value: LastName" />\r\n      </div>\r\n    </div>\r\n    <div class="control-group">\r\n      <label class="control-label" for="input-birthday">Birthday</label>\r\n      <div class="controls">\r\n        <input type="date" class="input-xlarge" id="input-birthday" data-bind="value: Birthday" required="" />\r\n      </div>\r\n    </div>\r\n    <div class="control-group">\r\n      <label class="control-label" for="input-tele">Phone</label>\r\n      <div class="controls">\r\n        <input type="tel" class="input-xlarge" id="input-tele" data-bind="value: Phone" />\r\n      </div>\r\n    </div>\r\n    <div class="control-group">\r\n      <label class="control-label" for="input-tele">Email</label>\r\n      <div class="controls">\r\n        <input type="email" class="input-xlarge" id="input-tele" data-bind="value: Email" />\r\n      </div>\r\n    </div>\r\n    <div class="control-group">\r\n      <label class="control-label" for="input-street1">Street Address 1</label>\r\n      <div class="controls">\r\n        <input type="text" class="input-xlarge" id="input-street1" data-bind="value: Street1" required="" />\r\n      </div>\r\n    </div>\r\n    <div class="control-group">\r\n      <label class="control-label" for="input-street2">Street Address 2</label>\r\n      <div class="controls">\r\n        <input type="text" class="input-xlarge" id="input-street2" data-bind="value: Street2" />\r\n      </div>\r\n    </div>\r\n    <div class="control-group">\r\n      <label class="control-label" for="input-suburb">Suburb</label>\r\n      <div class="controls">\r\n        <input type="text" class="input-xlarge" id="input-suburb" data-bind="value: Suburb" required="" />\r\n      </div>\r\n    </div>\r\n    <div class="control-group">\r\n      <label class="control-label" for="input-suburb">State</label>\r\n      <div class="controls">\r\n        <input type="text" class="input-xlarge" id="input-suburb" data-bind="value: State" required="" />\r\n      </div>\r\n    </div>\r\n    <div class="control-group">\r\n      <label class="control-label" for="input-postcode">Postcode</label>\r\n      <div class="controls">\r\n        <input type="text" class="input-xlarge" id="input-postcode" data-bind="value: Postcode" required="" />\r\n      </div>\r\n    </div>\r\n  </div>\r\n  <div class="modal-footer">\r\n    <a href="#" class="btn" data-dismiss="modal">Close</a>\r\n    <button type="submit" class="btn btn-primary">Save changes</button>\r\n  </div>\r\n</form>'});return t.registerPartial("views_createRegistration",n),n}),define("viewModels/NewRegistrationViewModel",["jquery","knockout","sammy","hbs!views/createRegistration","gfx/effects"],function(e,t,n){var r=function(){return{Id:null,FirstName:null,LastName:null,Phone:null,Email:null,Birthday:null,Street1:null,Street2:null,Suburb:null,State:null,Postcode:null}};t.bindingHandlers.jqmsubmit={init:function(n,r,i,s){t.bindingHandlers.submit.init(n,r,i,s),e(n).submit(function(e){return e.preventDefault(),e.stopPropagation(),!1})}};var i=function(n){this.url=App.urlBuilder("contacts");var i=this;this.el=e(n),e("body").bind("new-registration",function(){!i.existingContact||delete i.existingContact,t.mapping.fromJS(r(),{},i.properties),i.el.modal("show")}),e("body").bind("edit-registration",function(e){i.existingContact=e.contact,t.mapping.fromJS(e.contact,{},i.properties),i.el.modal("show")}),e("body").bind("close-registration",function(){i.el.modal("hide")}),e("body").bind("update-by-id",function(e){!!i.properties.Id&&i.properties.Id()>0&&i.properties.Id()==e.contact.Id&&i.el.is(":visible")&&(t.mapping.fromJS(e.contact,{},i.properties),toastr.warning("The registration you are editing has been updated because it was saved by another user."))}),this.properties={FirstName:t.observable(),LastName:t.observable(),Phone:t.observable(),Email:t.observable(),Birthday:t.observable(),Street1:t.observable(),Street2:t.observable(),Suburb:t.observable(),State:t.observable(),Postcode:t.observable()},this.render=function(){this.el.html(require("hbs!views/createRegistration")())}.bind(this),this.createRegistration=function(n){var r=!!i.properties.Id&&i.properties.Id()>0,s=JSON.stringify(t.mapping.toJS(i.properties)),o=i.properties.Id;return delete i.properties.Id,e.ajax({url:i.url(),dataType:"json",type:r?"PUT":"POST",data:s,accept:"application/json",contentType:"application/json"}).success(function(){i.el.modal("hide"),toastr.success("Registration saved!")}).fail(function(){i.properties.Id=o,toastr.error("Failed to save records, something went wrong :'(")}),!1}};return i}),define("viewModels/DeleteContactViewModel",["jquery","knockout","sammy","hbs!views/createRegistration","gfx/effects"],function(e,t,n){var r=function(t){this.url=App.urlBuilder("contacts");var n=this;this.el=e(t),this.contact=null,e("body").bind("delete-contact",function(e){n.contact=e.contact,n.el.modal("show")}),this.render=function(){}.bind(this),this.removeContact=function(){e.ajax({url:n.url("DeleteContact"),dataType:"json",type:"DELETE",data:JSON.stringify({Id:n.contact.Id}),accept:"application/json",contentType:"application/json"}).success(function(){toastr.success("Deleted"),n.el.modal("hide")}).fail(function(){toastr.error("Failed to save record :'(")})}};return r}),!function(e){e(function(){e.support.transition=function(){var e=function(){var e=document.createElement("bootstrap"),t={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"},n;for(n in t)if(e.style[n]!==undefined)return t[n]}();return e&&{end:e}}()})}(window.jQuery),!function(e){var t='[data-dismiss="alert"]',n=function(n){e(n).on("click",t,this.close)};n.prototype.close=function(t){function s(){i.trigger("closed").remove()}var n=e(this),r=n.attr("data-target"),i;r||(r=n.attr("href"),r=r&&r.replace(/.*(?=#[^\s]*$)/,"")),i=e(r),t&&t.preventDefault(),i.length||(i=n.hasClass("alert")?n:n.parent()),i.trigger(t=e.Event("close"));if(t.isDefaultPrevented())return;i.removeClass("in"),e.support.transition&&i.hasClass("fade")?i.on(e.support.transition.end,s):s()},e.fn.alert=function(t){return this.each(function(){var r=e(this),i=r.data("alert");i||r.data("alert",i=new n(this)),typeof t=="string"&&i[t].call(r)})},e.fn.alert.Constructor=n,e(function(){e("body").on("click.alert.data-api",t,n.prototype.close)})}(window.jQuery),!function(e){var t=function(t,n){this.$element=e(t),this.options=e.extend({},e.fn.button.defaults,n)};t.prototype.setState=function(e){var t="disabled",n=this.$element,r=n.data(),i=n.is("input")?"val":"html";e+="Text",r.resetText||n.data("resetText",n[i]()),n[i](r[e]||this.options[e]),setTimeout(function(){e=="loadingText"?n.addClass(t).attr(t,t):n.removeClass(t).removeAttr(t)},0)},t.prototype.toggle=function(){var e=this.$element.parent('[data-toggle="buttons-radio"]');e&&e.find(".active").removeClass("active"),this.$element.toggleClass("active")},e.fn.button=function(n){return this.each(function(){var r=e(this),i=r.data("button"),s=typeof n=="object"&&n;i||r.data("button",i=new t(this,s)),n=="toggle"?i.toggle():n&&i.setState(n)})},e.fn.button.defaults={loadingText:"loading..."},e.fn.button.Constructor=t,e(function(){e("body").on("click.button.data-api","[data-toggle^=button]",function(t){var n=e(t.target);n.hasClass("btn")||(n=n.closest(".btn")),n.button("toggle")})})}(window.jQuery),!function(e){var t=function(t,n){this.$element=e(t),this.options=n,this.options.slide&&this.slide(this.options.slide),this.options.pause=="hover"&&this.$element.on("mouseenter",e.proxy(this.pause,this)).on("mouseleave",e.proxy(this.cycle,this))};t.prototype={cycle:function(t){return t||(this.paused=!1),this.options.interval&&!this.paused&&(this.interval=setInterval(e.proxy(this.next,this),this.options.interval)),this},to:function(t){var n=this.$element.find(".item.active"),r=n.parent().children(),i=r.index(n),s=this;if(t>r.length-1||t<0)return;return this.sliding?this.$element.one("slid",function(){s.to(t)}):i==t?this.pause().cycle():this.slide(t>i?"next":"prev",e(r[t]))},pause:function(t){return t||(this.paused=!0),this.$element.find(".next, .prev").length&&e.support.transition.end&&(this.$element.trigger(e.support.transition.end),this.cycle()),clearInterval(this.interval),this.interval=null,this},next:function(){if(this.sliding)return;return this.slide("next")},prev:function(){if(this.sliding)return;return this.slide("prev")},slide:function(t,n){var r=this.$element.find(".item.active"),i=n||r[t](),s=this.interval,o=t=="next"?"left":"right",u=t=="next"?"first":"last",a=this,f=e.Event("slide",{relatedTarget:i[0]});this.sliding=!0,s&&this.pause(),i=i.length?i:this.$element.find(".item")[u]();if(i.hasClass("active"))return;if(e.support.transition&&this.$element.hasClass("slide")){this.$element.trigger(f);if(f.isDefaultPrevented())return;i.addClass(t),i[0].offsetWidth,r.addClass(o),i.addClass(o),this.$element.one(e.support.transition.end,function(){i.removeClass([t,o].join(" ")).addClass("active"),r.removeClass(["active",o].join(" ")),a.sliding=!1,setTimeout(function(){a.$element.trigger("slid")},0)})}else{this.$element.trigger(f);if(f.isDefaultPrevented())return;r.removeClass("active"),i.addClass("active"),this.sliding=!1,this.$element.trigger("slid")}return s&&this.cycle(),this}},e.fn.carousel=function(n){return this.each(function(){var r=e(this),i=r.data("carousel"),s=e.extend({},e.fn.carousel.defaults,typeof n=="object"&&n),o=typeof n=="string"?n:s.slide;i||r.data("carousel",i=new t(this,s)),typeof n=="number"?i.to(n):o?i[o]():s.interval&&i.cycle()})},e.fn.carousel.defaults={interval:5e3,pause:"hover"},e.fn.carousel.Constructor=t,e(function(){e("body").on("click.carousel.data-api","[data-slide]",function(t){var n=e(this),r,i=e(n.attr("data-target")||(r=n.attr("href"))&&r.replace(/.*(?=#[^\s]+$)/,"")),s=!i.data("modal")&&e.extend({},i.data(),n.data());i.carousel(s),t.preventDefault()})})}(window.jQuery),!function(e){var t=function(t,n){this.$element=e(t),this.options=e.extend({},e.fn.collapse.defaults,n),this.options.parent&&(this.$parent=e(this.options.parent)),this.options.toggle&&this.toggle()};t.prototype={constructor:t,dimension:function(){var e=this.$element.hasClass("width");return e?"width":"height"},show:function(){var t,n,r,i;if(this.transitioning)return;t=this.dimension(),n=e.camelCase(["scroll",t].join("-")),r=this.$parent&&this.$parent.find("> .accordion-group > .in");if(r&&r.length){i=r.data("collapse");if(i&&i.transitioning)return;r.collapse("hide"),i||r.data("collapse",null)}this.$element[t](0),this.transition("addClass",e.Event("show"),"shown"),e.support.transition&&this.$element[t](this.$element[0][n])},hide:function(){var t;if(this.transitioning)return;t=this.dimension(),this.reset(this.$element[t]()),this.transition("removeClass",e.Event("hide"),"hidden"),this.$element[t](0)},reset:function(e){var t=this.dimension();return this.$element.removeClass("collapse")[t](e||"auto")[0].offsetWidth,this.$element[e!==null?"addClass":"removeClass"]("collapse"),this},transition:function(t,n,r){var i=this,s=function(){n.type=="show"&&i.reset(),i.transitioning=0,i.$element.trigger(r)};this.$element.trigger(n);if(n.isDefaultPrevented())return;this.transitioning=1,this.$element[t]("in"),e.support.transition&&this.$element.hasClass("collapse")?this.$element.one(e.support.transition.end,s):s()},toggle:function(){this[this.$element.hasClass("in")?"hide":"show"]()}},e.fn.collapse=function(n){return this.each(function(){var r=e(this),i=r.data("collapse"),s=typeof n=="object"&&n;i||r.data("collapse",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.collapse.defaults={toggle:!0},e.fn.collapse.Constructor=t,e(function(){e("body").on("click.collapse.data-api","[data-toggle=collapse]",function(t){var n=e(this),r,i=n.attr("data-target")||t.preventDefault()||(r=n.attr("href"))&&r.replace(/.*(?=#[^\s]+$)/,""),s=e(i).data("collapse")?"toggle":n.data();n[e(i).hasClass("in")?"addClass":"removeClass"]("collapsed"),e(i).collapse(s)})})}(window.jQuery),!function(e){function r(){i(e(t)).removeClass("open")}function i(t){var n=t.attr("data-target"),r;return n||(n=t.attr("href"),n=n&&n.replace(/.*(?=#[^\s]*$)/,"")),r=e(n),r.length||(r=t.parent()),r}var t="[data-toggle=dropdown]",n=function(t){var n=e(t).on("click.dropdown.data-api",this.toggle);e("html").on("click.dropdown.data-api",function(){n.parent().removeClass("open")})};n.prototype={constructor:n,toggle:function(t){var n=e(this),s,o;if(n.is(".disabled, :disabled"))return;return s=i(n),o=s.hasClass("open"),r(),o||(s.toggleClass("open"),n.focus()),!1},keydown:function(t){var n,r,s,o,u,a;if(!/(38|40|27)/.test(t.keyCode))return;n=e(this),t.preventDefault(),t.stopPropagation();if(n.is(".disabled, :disabled"))return;o=i(n),u=o.hasClass("open");if(!u||u&&t.keyCode==27)return n.click();r=e("[role=menu] li:not(.divider) a",o);if(!r.length)return;a=r.index(r.filter(":focus")),t.keyCode==38&&a>0&&a--,t.keyCode==40&&a<r.length-1&&a++,~a||(a=0),r.eq(a).focus()}},e.fn.dropdown=function(t){return this.each(function(){var r=e(this),i=r.data("dropdown");i||r.data("dropdown",i=new n(this)),typeof t=="string"&&i[t].call(r)})},e.fn.dropdown.Constructor=n,e(function(){e("html").on("click.dropdown.data-api touchstart.dropdown.data-api",r),e("body").on("click.dropdown touchstart.dropdown.data-api",".dropdown",function(e){e.stopPropagation()}).on("click.dropdown.data-api touchstart.dropdown.data-api",t,n.prototype.toggle).on("keydown.dropdown.data-api touchstart.dropdown.data-api",t+", [role=menu]",n.prototype.keydown)})}(window.jQuery),!function(e){var t=function(t,n){this.options=n,this.$element=e(t).delegate('[data-dismiss="modal"]',"click.dismiss.modal",e.proxy(this.hide,this)),this.options.remote&&this.$element.find(".modal-body").load(this.options.remote)};t.prototype={constructor:t,toggle:function(){return this[this.isShown?"hide":"show"]()},show:function(){var t=this,n=e.Event("show");this.$element.trigger(n);if(this.isShown||n.isDefaultPrevented())return;e("body").addClass("modal-open"),this.isShown=!0,this.escape(),this.backdrop(function(){var n=e.support.transition&&t.$element.hasClass("fade");t.$element.parent().length||t.$element.appendTo(document.body),t.$element.show(),n&&t.$element[0].offsetWidth,t.$element.addClass("in").attr("aria-hidden",!1).focus(),t.enforceFocus(),n?t.$element.one(e.support.transition.end,function(){t.$element.trigger("shown")}):t.$element.trigger("shown")})},hide:function(t){t&&t.preventDefault();var n=this;t=e.Event("hide"),this.$element.trigger(t);if(!this.isShown||t.isDefaultPrevented())return;this.isShown=!1,e("body").removeClass("modal-open"),this.escape(),e(document).off("focusin.modal"),this.$element.removeClass("in").attr("aria-hidden",!0),e.support.transition&&this.$element.hasClass("fade")?this.hideWithTransition():this.hideModal()},enforceFocus:function(){var t=this;e(document).on("focusin.modal",function(e){t.$element[0]!==e.target&&!t.$element.has(e.target).length&&t.$element.focus()})},escape:function(){var e=this;this.isShown&&this.options.keyboard?this.$element.on("keyup.dismiss.modal",function(t){t.which==27&&e.hide()}):this.isShown||this.$element.off("keyup.dismiss.modal")},hideWithTransition:function(){var t=this,n=setTimeout(function(){t.$element.off(e.support.transition.end),t.hideModal()},500);this.$element.one(e.support.transition.end,function(){clearTimeout(n),t.hideModal()})},hideModal:function(e){this.$element.hide().trigger("hidden"),this.backdrop()},removeBackdrop:function(){this.$backdrop.remove(),this.$backdrop=null},backdrop:function(t){var n=this,r=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var i=e.support.transition&&r;this.$backdrop=e('<div class="modal-backdrop '+r+'" />').appendTo(document.body),this.options.backdrop!="static"&&this.$backdrop.click(e.proxy(this.hide,this)),i&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),i?this.$backdrop.one(e.support.transition.end,t):t()}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("in"),e.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one(e.support.transition.end,e.proxy(this.removeBackdrop,this)):this.removeBackdrop()):t&&t()}},e.fn.modal=function(n){return this.each(function(){var r=e(this),i=r.data("modal"),s=e.extend({},e.fn.modal.defaults,r.data(),typeof n=="object"&&n);i||r.data("modal",i=new t(this,s)),typeof n=="string"?i[n]():s.show&&i.show()})},e.fn.modal.defaults={backdrop:!0,keyboard:!0,show:!0},e.fn.modal.Constructor=t,e(function(){e("body").on("click.modal.data-api",'[data-toggle="modal"]',function(t){var n=e(this),r=n.attr("href"),i=e(n.attr("data-target")||r&&r.replace(/.*(?=#[^\s]+$)/,"")),s=i.data("modal")?"toggle":e.extend({remote:!/#/.test(r)&&r},i.data(),n.data());t.preventDefault(),i.modal(s).one("hide",function(){n.focus()})})})}(window.jQuery),!function(e){var t=function(e,t){this.init("tooltip",e,t)};t.prototype={constructor:t,init:function(t,n,r){var i,s;this.type=t,this.$element=e(n),this.options=this.getOptions(r),this.enabled=!0,this.options.trigger=="click"?this.$element.on("click."+this.type,this.options.selector,e.proxy(this.toggle,this)):this.options.trigger!="manual"&&(i=this.options.trigger=="hover"?"mouseenter":"focus",s=this.options.trigger=="hover"?"mouseleave":"blur",this.$element.on(i+"."+this.type,this.options.selector,e.proxy(this.enter,this)),this.$element.on(s+"."+this.type,this.options.selector,e.proxy(this.leave,this))),this.options.selector?this._options=e.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},getOptions:function(t){return t=e.extend({},e.fn[this.type].defaults,t,this.$element.data()),t.delay&&typeof t.delay=="number"&&(t.delay={show:t.delay,hide:t.delay}),t},enter:function(t){var n=e(t.currentTarget)[this.type](this._options).data(this.type);if(!n.options.delay||!n.options.delay.show)return n.show();clearTimeout(this.timeout),n.hoverState="in",this.timeout=setTimeout(function(){n.hoverState=="in"&&n.show()},n.options.delay.show)},leave:function(t){var n=e(t.currentTarget)[this.type](this._options).data(this.type);this.timeout&&clearTimeout(this.timeout);if(!n.options.delay||!n.options.delay.hide)return n.hide();n.hoverState="out",this.timeout=setTimeout(function(){n.hoverState=="out"&&n.hide()},n.options.delay.hide)},show:function(){var e,t,n,r,i,s,o;if(this.hasContent()&&this.enabled){e=this.tip(),this.setContent(),this.options.animation&&e.addClass("fade"),s=typeof this.options.placement=="function"?this.options.placement.call(this,e[0],this.$element[0]):this.options.placement,t=/in/.test(s),e.remove().css({top:0,left:0,display:"block"}).appendTo(t?this.$element:document.body),n=this.getPosition(t),r=e[0].offsetWidth,i=e[0].offsetHeight;switch(t?s.split(" ")[1]:s){case"bottom":o={top:n.top+n.height,left:n.left+n.width/2-r/2};break;case"top":o={top:n.top-i,left:n.left+n.width/2-r/2};break;case"left":o={top:n.top+n.height/2-i/2,left:n.left-r};break;case"right":o={top:n.top+n.height/2-i/2,left:n.left+n.width}}e.css(o).addClass(s).addClass("in")}},setContent:function(){var e=this.tip(),t=this.getTitle();e.find(".tooltip-inner")[this.options.html?"html":"text"](t),e.removeClass("fade in top bottom left right")},hide:function(){function r(){var t=setTimeout(function(){n.off(e.support.transition.end).remove()},500);n.one(e.support.transition.end,function(){clearTimeout(t),n.remove()})}var t=this,n=this.tip();return n.removeClass("in"),e.support.transition&&this.$tip.hasClass("fade")?r():n.remove(),this},fixTitle:function(){var e=this.$element;(e.attr("title")||typeof e.attr("data-original-title")!="string")&&e.attr("data-original-title",e.attr("title")||"").removeAttr("title")},hasContent:function(){return this.getTitle()},getPosition:function(t){return e.extend({},t?{top:0,left:0}:this.$element.offset(),{width:this.$element[0].offsetWidth,height:this.$element[0].offsetHeight})},getTitle:function(){var e,t=this.$element,n=this.options;return e=t.attr("data-original-title")||(typeof n.title=="function"?n.title.call(t[0]):n.title),e},tip:function(){return this.$tip=this.$tip||e(this.options.template)},validate:function(){this.$element[0].parentNode||(this.hide(),this.$element=null,this.options=null)},enable:function(){this.enabled=!0},disable:function(){this.enabled=!1},toggleEnabled:function(){this.enabled=!this.enabled},toggle:function(){this[this.tip().hasClass("in")?"hide":"show"]()},destroy:function(){this.hide().$element.off("."+this.type).removeData(this.type)}},e.fn.tooltip=function(n){return this.each(function(){var r=e(this),i=r.data("tooltip"),s=typeof n=="object"&&n;i||r.data("tooltip",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.tooltip.Constructor=t,e.fn.tooltip.defaults={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover",title:"",delay:0,html:!0}}(window.jQuery),!function(e){var t=function(e,t){this.init("popover",e,t)};t.prototype=e.extend({},e.fn.tooltip.Constructor.prototype,{constructor:t,setContent:function(){var e=this.tip(),t=this.getTitle(),n=this.getContent();e.find(".popover-title")[this.options.html?"html":"text"](t),e.find(".popover-content > *")[this.options.html?"html":"text"](n),e.removeClass("fade top bottom left right in")},hasContent:function(){return this.getTitle()||this.getContent()},getContent:function(){var e,t=this.$element,n=this.options;return e=t.attr("data-content")||(typeof n.content=="function"?n.content.call(t[0]):n.content),e},tip:function(){return this.$tip||(this.$tip=e(this.options.template)),this.$tip},destroy:function(){this.hide().$element.off("."+this.type).removeData(this.type)}}),e.fn.popover=function(n){return this.each(function(){var r=e(this),i=r.data("popover"),s=typeof n=="object"&&n;i||r.data("popover",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.popover.Constructor=t,e.fn.popover.defaults=e.extend({},e.fn.tooltip.defaults,{placement:"right",trigger:"click",content:"",template:'<div class="popover"><div class="arrow"></div><div class="popover-inner"><h3 class="popover-title"></h3><div class="popover-content"><p></p></div></div></div>'})}(window.jQuery),!function(e){function t(t,n){var r=e.proxy(this.process,this),i=e(t).is("body")?e(window):e(t),s;this.options=e.extend({},e.fn.scrollspy.defaults,n),this.$scrollElement=i.on("scroll.scroll-spy.data-api",r),this.selector=(this.options.target||(s=e(t).attr("href"))&&s.replace(/.*(?=#[^\s]+$)/,"")||"")+" .nav li > a",this.$body=e("body"),this.refresh(),this.process()}t.prototype={constructor:t,refresh:function(){var t=this,n;this.offsets=e([]),this.targets=e([]),n=this.$body.find(this.selector).map(function(){var t=e(this),n=t.data("target")||t.attr("href"),r=/^#\w/.test(n)&&e(n);return r&&r.length&&[[r.position().top,n]]||null}).sort(function(e,t){return e[0]-t[0]}).each(function(){t.offsets.push(this[0]),t.targets.push(this[1])})},process:function(){var e=this.$scrollElement.scrollTop()+this.options.offset,t=this.$scrollElement[0].scrollHeight||this.$body[0].scrollHeight,n=t-this.$scrollElement.height(),r=this.offsets,i=this.targets,s=this.activeTarget,o;if(e>=n)return s!=(o=i.last()[0])&&this.activate(o);for(o=r.length;o--;)s!=i[o]&&e>=r[o]&&(!r[o+1]||e<=r[o+1])&&this.activate(i[o])},activate:function(t){var n,r;this.activeTarget=t,e(this.selector).parent(".active").removeClass("active"),r=this.selector+'[data-target="'+t+'"],'+this.selector+'[href="'+t+'"]',n=e(r).parent("li").addClass("active"),n.parent(".dropdown-menu").length&&(n=n.closest("li.dropdown").addClass("active")),n.trigger("activate")}},e.fn.scrollspy=function(n){return this.each(function(){var r=e(this),i=r.data("scrollspy"),s=typeof n=="object"&&n;i||r.data("scrollspy",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.scrollspy.Constructor=t,e.fn.scrollspy.defaults={offset:10},e(window).on("load",function(){e('[data-spy="scroll"]').each(function(){var t=e(this);t.scrollspy(t.data())})})}(window.jQuery),!function(e){var t=function(t){this.element=e(t)};t.prototype={constructor:t,show:function(){var t=this.element,n=t.closest("ul:not(.dropdown-menu)"),r=t.attr("data-target"),i,s,o;r||(r=t.attr("href"),r=r&&r.replace(/.*(?=#[^\s]*$)/,""));if(t.parent("li").hasClass("active"))return;i=n.find(".active a").last()[0],o=e.Event("show",{relatedTarget:i}),t.trigger(o);if(o.isDefaultPrevented())return;s=e(r),this.activate(t.parent("li"),n),this.activate(s,s.parent(),function(){t.trigger({type:"shown",relatedTarget:i})})},activate:function(t,n,r){function o(){i.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),t.addClass("active"),s?(t[0].offsetWidth,t.addClass("in")):t.removeClass("fade"),t.parent(".dropdown-menu")&&t.closest("li.dropdown").addClass("active"),r&&r()}var i=n.find("> .active"),s=r&&e.support.transition&&i.hasClass("fade");s?i.one(e.support.transition.end,o):o(),i.removeClass("in")}},e.fn.tab=function(n){return this.each(function(){var r=e(this),i=r.data("tab");i||r.data("tab",i=new t(this)),typeof n=="string"&&i[n]()})},e.fn.tab.Constructor=t,e(function(){e("body").on("click.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(t){t.preventDefault(),e(this).tab("show")})})}(window.jQuery),!function(e){var t=function(t,n){this.$element=e(t),this.options=e.extend({},e.fn.typeahead.defaults,n),this.matcher=this.options.matcher||this.matcher,this.sorter=this.options.sorter||this.sorter,this.highlighter=this.options.highlighter||this.highlighter,this.updater=this.options.updater||this.updater,this.$menu=e(this.options.menu).appendTo("body"),this.source=this.options.source,this.shown=!1,this.listen()};t.prototype={constructor:t,select:function(){var e=this.$menu.find(".active").attr("data-value");return this.$element.val(this.updater(e)).change(),this.hide()},updater:function(e){return e},show:function(){var t=e.extend({},this.$element.offset(),{height:this.$element[0].offsetHeight});return this.$menu.css({top:t.top+t.height,left:t.left}),this.$menu.show(),this.shown=!0,this},hide:function(){return this.$menu.hide(),this.shown=!1,this},lookup:function(t){var n;return this.query=this.$element.val(),!this.query||this.query.length<this.options.minLength?this.shown?this.hide():this:(n=e.isFunction(this.source)?this.source(this.query,e.proxy(this.process,this)):this.source,n?this.process(n):this)},process:function(t){var n=this;return t=e.grep(t,function(e){return n.matcher(e)}),t=this.sorter(t),t.length?this.render(t.slice(0,this.options.items)).show():this.shown?this.hide():this},matcher:function(e){return~e.toLowerCase().indexOf(this.query.toLowerCase())},sorter:function(e){var t=[],n=[],r=[],i;while(i=e.shift())i.toLowerCase().indexOf(this.query.toLowerCase())?~i.indexOf(this.query)?n.push(i):r.push(i):t.push(i);return t.concat(n,r)},highlighter:function(e){var t=this.query.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&");return e.replace(new RegExp("("+t+")","ig"),function(e,t){return"<strong>"+t+"</strong>"})},render:function(t){var n=this;return t=e(t).map(function(t,r){return t=e(n.options.item).attr("data-value",r),t.find("a").html(n.highlighter(r)),t[0]}),t.first().addClass("active"),this.$menu.html(t),this},next:function(t){var n=this.$menu.find(".active").removeClass("active"),r=n.next();r.length||(r=e(this.$menu.find("li")[0])),r.addClass("active")},prev:function(e){var t=this.$menu.find(".active").removeClass("active"),n=t.prev();n.length||(n=this.$menu.find("li").last()),n.addClass("active")},listen:function(){this.$element.on("blur",e.proxy(this.blur,this)).on("keypress",e.proxy(this.keypress,this)).on("keyup",e.proxy(this.keyup,this)),(e.browser.webkit||e.browser.msie)&&this.$element.on("keydown",e.proxy(this.keydown,this)),this.$menu.on("click",e.proxy(this.click,this)).on("mouseenter","li",e.proxy(this.mouseenter,this))},move:function(e){if(!this.shown)return;switch(e.keyCode){case 9:case 13:case 27:e.preventDefault();break;case 38:e.preventDefault(),this.prev();break;case 40:e.preventDefault(),this.next()}e.stopPropagation()},keydown:function(t){this.suppressKeyPressRepeat=!~e.inArray(t.keyCode,[40,38,9,13,27]),this.move(t)},keypress:function(e){if(this.suppressKeyPressRepeat)return;this.move(e)},keyup:function(e){switch(e.keyCode){case 40:case 38:break;case 9:case 13:if(!this.shown)return;this.select();break;case 27:if(!this.shown)return;this.hide();break;default:this.lookup()}e.stopPropagation(),e.preventDefault()},blur:function(e){var t=this;setTimeout(function(){t.hide()},150)},click:function(e){e.stopPropagation(),e.preventDefault(),this.select()},mouseenter:function(t){this.$menu.find(".active").removeClass("active"),e(t.currentTarget).addClass("active")}},e.fn.typeahead=function(n){return this.each(function(){var r=e(this),i=r.data("typeahead"),s=typeof n=="object"&&n;i||r.data("typeahead",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.typeahead.defaults={source:[],items:8,menu:'<ul class="typeahead dropdown-menu"></ul>',item:'<li><a href="#"></a></li>',minLength:1},e.fn.typeahead.Constructor=t,e(function(){e("body").on("focus.typeahead.data-api",'[data-provide="typeahead"]',function(t){var n=e(this);if(n.data("typeahead"))return;t.preventDefault(),n.typeahead(n.data())})})}(window.jQuery),!function(e){var t=function(t,n){this.options=e.extend({},e.fn.affix.defaults,n),this.$window=e(window).on("scroll.affix.data-api",e.proxy(this.checkPosition,this)),this.$element=e(t),this.checkPosition()};t.prototype.checkPosition=function(){if(!this.$element.is(":visible"))return;var t=e(document).height(),n=this.$window.scrollTop(),r=this.$element.offset(),i=this.options.offset,s=i.bottom,o=i.top,u="affix affix-top affix-bottom",a;typeof i!="object"&&(s=o=i),typeof o=="function"&&(o=i.top()),typeof s=="function"&&(s=i.bottom()),a=this.unpin!=null&&n+this.unpin<=r.top?!1:s!=null&&r.top+this.$element.height()>=t-s?"bottom":o!=null&&n<=o?"top":!1;if(this.affixed===a)return;this.affixed=a,this.unpin=a=="bottom"?r.top-n:null,this.$element.removeClass(u).addClass("affix"+(a?"-"+a:""))},e.fn.affix=function(n){return this.each(function(){var r=e(this),i=r.data("affix"),s=typeof n=="object"&&n;i||r.data("affix",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.affix.Constructor=t,e.fn.affix.defaults={offset:0},e(window).on("load",function(){e('[data-spy="affix"]').each(function(){var t=e(this),n=t.data();n.offset=n.offset||{},n.offsetBottom&&(n.offset.bottom=n.offsetBottom),n.offsetTop&&(n.offset.top=n.offsetTop),t.affix(n)})})}(window.jQuery),define("bootstrap",function(){}),window.Modernizr=function(e,t,n){function r(e){g.cssText=e}function i(e,t){return r(E.join(e+";")+(t||""))}function s(e,t){return typeof e===t}function o(e,t){return!!~(""+e).indexOf(t)}function u(e,t){for(var r in e){var i=e[r];if(!o(i,"-")&&g[i]!==n)return t=="pfx"?i:!0}return!1}function a(e,t,r){for(var i in e){var o=t[e[i]];if(o!==n)return r===!1?e[i]:s(o,"function")?o.bind(r||t):o}return!1}function f(e,t,n){var r=e.charAt(0).toUpperCase()+e.slice(1),i=(e+" "+x.join(r+" ")+r).split(" ");return s(t,"string")||s(t,"undefined")?u(i,t):(i=(e+" "+T.join(r+" ")+r).split(" "),a(i,t,n))}function l(){h.input=function(n){for(var r=0,i=n.length;r<i;r++)k[n[r]]=n[r]in y;return k.list&&(k.list=!!t.createElement("datalist")&&!!e.HTMLDataListElement),k}("autocomplete autofocus list placeholder max min multiple pattern required step".split(" ")),h.inputtypes=function(e){for(var r=0,i,s,o,u=e.length;r<u;r++)y.setAttribute("type",s=e[r]),i=y.type!=="text",i&&(y.value=b,y.style.cssText="position:absolute;visibility:hidden;",/^range$/.test(s)&&y.style.WebkitAppearance!==n?(d.appendChild(y),o=t.defaultView,i=o.getComputedStyle&&o.getComputedStyle(y,null).WebkitAppearance!=="textfield"&&y.offsetHeight!==0,d.removeChild(y)):/^(search|tel)$/.test(s)||(/^(url|email)$/.test(s)?i=y.checkValidity&&y.checkValidity()===!1:i=y.value!=b)),C[e[r]]=!!i;return C}("search tel url email datetime date month week time datetime-local number range color".split(" "))}var c="2.6.2",h={},p=!0,d=t.documentElement,v="modernizr",m=t.createElement(v),g=m.style,y=t.createElement("input"),b=":)",w={}.toString,E=" -webkit- -moz- -o- -ms- ".split(" "),S="Webkit Moz O ms",x=S.split(" "),T=S.toLowerCase().split(" "),N={},C={},k={},L=[],A=L.slice,O,M=function(e,n,r,i){var s,o,u,a,f=t.createElement("div"),l=t.body,c=l||t.createElement("body");if(parseInt(r,10))while(r--)u=t.createElement("div"),u.id=i?i[r]:v+(r+1),f.appendChild(u);return s=["&#173;",'<style id="s',v,'">',e,"</style>"].join(""),f.id=v,(l?f:c).innerHTML+=s,c.appendChild(f),l||(c.style.background="",c.style.overflow="hidden",a=d.style.overflow,d.style.overflow="hidden",d.appendChild(c)),o=n(f,e),l?f.parentNode.removeChild(f):(c.parentNode.removeChild(c),d.style.overflow=a),!!o},_=function(){function e(e,i){i=i||t.createElement(r[e]||"div"),e="on"+e;var o=e in i;return o||(i.setAttribute||(i=t.createElement("div")),i.setAttribute&&i.removeAttribute&&(i.setAttribute(e,""),o=s(i[e],"function"),s(i[e],"undefined")||(i[e]=n),i.removeAttribute(e))),i=null,o}var r={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return e}(),D={}.hasOwnProperty,P;!s(D,"undefined")&&!s(D.call,"undefined")?P=function(e,t){return D.call(e,t)}:P=function(e,t){return t in e&&s(e.constructor.prototype[t],"undefined")},Function.prototype.bind||(Function.prototype.bind=function(e){var t=this;if(typeof t!="function")throw new TypeError;var n=A.call(arguments,1),r=function(){if(this instanceof r){var i=function(){};i.prototype=t.prototype;var s=new i,o=t.apply(s,n.concat(A.call(arguments)));return Object(o)===o?o:s}return t.apply(e,n.concat(A.call(arguments)))};return r}),N.touch=function(){var n;return"ontouchstart"in e||e.DocumentTouch&&t instanceof DocumentTouch?n=!0:M(["@media (",E.join("touch-enabled),("),v,")","{#modernizr{top:9px;position:absolute}}"].join(""),function(e){n=e.offsetTop===9}),n},N.geolocation=function(){return"geolocation"in navigator},N.hashchange=function(){return _("hashchange",e)&&(t.documentMode===n||t.documentMode>7)},N.history=function(){return!!e.history&&!!history.pushState},N.cssanimations=function(){return f("animationName")},N.csstransforms=function(){return!!f("transform")},N.csstransforms3d=function(){var e=!!f("perspective");return e&&"webkitPerspective"in d.style&&M("@media (transform-3d),(-webkit-transform-3d){#modernizr{left:9px;position:absolute;height:3px;}}",function(t,n){e=t.offsetLeft===9&&t.offsetHeight===3}),e},N.csstransitions=function(){return f("transition")},N.localstorage=function(){try{return localStorage.setItem(v,v),localStorage.removeItem(v),!0}catch(e){return!1}},N.sessionstorage=function(){try{return sessionStorage.setItem(v,v),sessionStorage.removeItem(v),!0}catch(e){return!1}},N.applicationcache=function(){return!!e.applicationCache};for(var H in N)P(N,H)&&(O=H.toLowerCase(),h[O]=N[H](),L.push((h[O]?"":"no-")+O));return h.input||l(),h.addTest=function(e,t){if(typeof e=="object")for(var r in e)P(e,r)&&h.addTest(r,e[r]);else{e=e.toLowerCase();if(h[e]!==n)return h;t=typeof t=="function"?t():t,typeof p!="undefined"&&p&&(d.className+=" "+(t?"":"no-")+e),h[e]=t}return h},r(""),m=y=null,function(e,t){function n(e,t){var n=e.createElement("p"),r=e.getElementsByTagName("head")[0]||e.documentElement;return n.innerHTML="x<style>"+t+"</style>",r.insertBefore(n.lastChild,r.firstChild)}function r(){var e=g.elements;return typeof e=="string"?e.split(" "):e}function i(e){var t=v[e[p]];return t||(t={},d++,e[p]=d,v[d]=t),t}function s(e,n,r){n||(n=t);if(m)return n.createElement(e);r||(r=i(n));var s;return r.cache[e]?s=r.cache[e].cloneNode():c.test(e)?s=(r.cache[e]=r.createElem(e)).cloneNode():s=r.createElem(e),s.canHaveChildren&&!l.test(e)?r.frag.appendChild(s):s}function o(e,n){e||(e=t);if(m)return e.createDocumentFragment();n=n||i(e);var s=n.frag.cloneNode(),o=0,u=r(),a=u.length;for(;o<a;o++)s.createElement(u[o]);return s}function u(e,t){t.cache||(t.cache={},t.createElem=e.createElement,t.createFrag=e.createDocumentFragment,t.frag=t.createFrag()),e.createElement=function(n){return g.shivMethods?s(n,e,t):t.createElem(n)},e.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+r().join().replace(/\w+/g,function(e){return t.createElem(e),t.frag.createElement(e),'c("'+e+'")'})+");return n}")(g,t.frag)}function a(e){e||(e=t);var r=i(e);return g.shivCSS&&!h&&!r.hasCSS&&(r.hasCSS=!!n(e,"article,aside,figcaption,figure,footer,header,hgroup,nav,section{display:block}mark{background:#FF0;color:#000}")),m||u(e,r),e}var f=e.html5||{},l=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,c=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,h,p="_html5shiv",d=0,v={},m;(function(){try{var e=t.createElement("a");e.innerHTML="<xyz></xyz>",h="hidden"in e,m=e.childNodes.length==1||function(){t.createElement("a");var e=t.createDocumentFragment();return typeof e.cloneNode=="undefined"||typeof e.createDocumentFragment=="undefined"||typeof e.createElement=="undefined"}()}catch(n){h=!0,m=!0}})();var g={elements:f.elements||"abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video",shivCSS:f.shivCSS!==!1,supportsUnknownElements:m,shivMethods:f.shivMethods!==!1,type:"default",shivDocument:a,createElement:s,createDocumentFragment:o};e.html5=g,a(t)}(this,t),h._version=c,h._prefixes=E,h._domPrefixes=T,h._cssomPrefixes=x,h.hasEvent=_,h.testProp=function(e){return u([e])},h.testAllProps=f,h.testStyles=M,d.className=d.className.replace(/(^|\s)no-js(\s|$)/,"$1$2")+(p?" js "+L.join(" "):""),h}(this,this.document),define("modernizr",function(){}),function(){var e,t;e=jQuery,t={width:120,height:120},e.fn.gfxFlip=function(n){var r,i,s;return n==null&&(n={}),s=e.extend({},t,n),i=e(this).find(".front"),r=e(this).find(".back"),e(this).css({position:"relative",perspective:"600","-webkit-perspective":"600","-moz-perspective":"600","transform-style":"preserve-3d","-webkit-transform-style":"preserve-3d","-moz-transform-style":"preserve-3d","transform-origin":"50% 50%","-webkit-transform-origin":"50% 50%","-moz-transform-origin":"50% 50%",width:s.width,height:s.height}),i.add(r).css({position:"absolute",width:"100%",height:"100%",display:"block","backface-visibility":"hidden","-webkit-backface-visibility":"hidden","-moz-backface-visibility":"hidden"}),r.transform({rotateY:"-180deg"}),e(this).bind("flip",function(){var t;return e(this).toggleClass("flipped"),t=e(this).hasClass("flipped"),i.gfx({rotateY:t?"180deg":"0deg"}),r.gfx({rotateY:t?"0deg":"-180deg"})})}}.call(this),define("gfx/flip",function(){}),function(e){e.fn.quicksand=function(t,n){var r={duration:750,easing:"swing",attribute:"data-id",adjustHeight:"auto",useScaling:!0,enhancement:function(e){},selector:"> *",dx:0,dy:0};e.extend(r,n);if(e.browser.msie&&parseInt(e.browser.version)<10||typeof e.fn.scale=="undefined")r.useScaling=!1;var i;if(typeof arguments[1]=="function")var i=arguments[1];else if(typeof (arguments[2]=="function"))var i=arguments[2];return this.each(function(n){var s,o=[],u=e(t).clone(),a=e(this),f=e(this).css("height"),l,c=!1,h=e(a).offset(),p=[],v=e(this).find(r.selector);if(e.browser.msie&&parseInt(e.browser.version)<7){a.html("").append(u);return}var m=0,g=function(){m||(m=1,$toDelete=a.find("> *"),a.prepend(S.find("> *")),$toDelete.remove(),c&&a.css("height",l),r.enhancement(a),typeof i=="function"&&i.call(this))},y=a.offsetParent(),b=y.offset();y.css("position")=="relative"?y.get(0).nodeName.toLowerCase()!="body"&&(b.top+=parseFloat(y.css("border-top-width"))||0,b.left+=parseFloat(y.css("border-left-width"))||0):(b.top-=parseFloat(y.css("border-top-width"))||0,b.left-=parseFloat(y.css("border-left-width"))||0,b.top-=parseFloat(y.css("margin-top"))||0,b.left-=parseFloat(y.css("margin-left"))||0),isNaN(b.left)&&(b.left=0),isNaN(b.top)&&(b.top=0),b.left-=r.dx,b.top-=r.dy,a.css("height",e(this).height()),v.each(function(t){p[t]=e(this).offset()}),e(this).stop();var w=0,E=0;v.each(function(t){e(this).stop();var n=e(this).get(0);n.style.position=="absolute"?(w=-r.dx,E=-r.dy):(w=r.dx,E=r.dy),n.style.position="absolute",n.style.margin="0",n.style.top=p[t].top-parseFloat(n.style.marginTop)-b.top+E+"px",n.style.left=p[t].left-parseFloat(n.style.marginLeft)-b.left+w+"px"});var S=e(a).clone(),x=S.get(0);x.innerHTML="",x.setAttribute("id",""),x.style.height="auto",x.style.width=a.width()+"px",S.append(u),S.insertBefore(a),S.css("opacity",0),x.style.zIndex=-1,x.style.margin="0",x.style.position="absolute",x.style.top=h.top-b.top+"px",x.style.left=h.left-b.left+"px",r.adjustHeight==="dynamic"?a.animate({height:S.height()},r.duration,r.easing):r.adjustHeight==="auto"&&(l=S.height(),parseFloat(f)<parseFloat(l)?a.css("height",l):c=!0),v.each(function(t){var n=[];typeof r.attribute=="function"?(s=r.attribute(e(this)),u.each(function(){if(r.attribute(this)==s)return n=e(this),!1})):n=u.filter("["+r.attribute+"="+e(this).attr(r.attribute)+"]"),n.length?r.useScaling?o.push({element:e(this),animation:{top:n.offset().top-b.top,left:n.offset().left-b.left,opacity:1,scale:"1.0"}}):o.push({element:e(this),animation:{top:n.offset().top-b.top,left:n.offset().left-b.left,opacity:1}}):r.useScaling?o.push({element:e(this),animation:{opacity:"0.0",scale:"0.0"}}):o.push({element:e(this),animation:{opacity:"0.0"}})}),u.each(function(t){var n=[],i=[];typeof r.attribute=="function"?(s=r.attribute(e(this)),v.each(function(){if(r.attribute(this)==s)return n=e(this),!1}),u.each(function(){if(r.attribute(this)==s)return i=e(this),!1})):(n=v.filter("["+r.attribute+"="+e(this).attr(r.attribute)+"]"),i=u.filter("["+r.attribute+"="+e(this).attr(r.attribute)+"]"));var f;if(n.length===0){r.useScaling?f={opacity:"1.0",scale:"1.0"}:f={opacity:"1.0"},d=i.clone();var l=d.get(0);l.style.position="absolute",l.style.margin="0",l.style.top=i.offset().top-b.top+"px",l.style.left=i.offset().left-b.left+"px",d.css("opacity",0),r.useScaling&&d.css("transform","scale(0.0)"),d.appendTo(a),o.push({element:e(d),animation:f})}}),S.remove(),r.enhancement(a);for(n=0;n<o.length;n++)o[n].element.animate(o[n].animation,r.duration,r.easing,g)})}}(jQuery),define("jquery/quicksand",function(){}),jQuery.easing.jswing=jQuery.easing.swing,jQuery.extend(jQuery.easing,{def:"easeOutQuad",swing:function(e,t,n,r,i){return jQuery.easing[jQuery.easing.def](e,t,n,r,i)},easeInQuad:function(e,t,n,r,i){return r*(t/=i)*t+n},easeOutQuad:function(e,t,n,r,i){return-r*(t/=i)*(t-2)+n},easeInOutQuad:function(e,t,n,r,i){return(t/=i/2)<1?r/2*t*t+n:-r/2*(--t*(t-2)-1)+n},easeInCubic:function(e,t,n,r,i){return r*(t/=i)*t*t+n},easeOutCubic:function(e,t,n,r,i){return r*((t=t/i-1)*t*t+1)+n},easeInOutCubic:function(e,t,n,r,i){return(t/=i/2)<1?r/2*t*t*t+n:r/2*((t-=2)*t*t+2)+n},easeInQuart:function(e,t,n,r,i){return r*(t/=i)*t*t*t+n},easeOutQuart:function(e,t,n,r,i){return-r*((t=t/i-1)*t*t*t-1)+n},easeInOutQuart:function(e,t,n,r,i){return(t/=i/2)<1?r/2*t*t*t*t+n:-r/2*((t-=2)*t*t*t-2)+n},easeInQuint:function(e,t,n,r,i){return r*(t/=i)*t*t*t*t+n},easeOutQuint:function(e,t,n,r,i){return r*((t=t/i-1)*t*t*t*t+1)+n},easeInOutQuint:function(e,t,n,r,i){return(t/=i/2)<1?r/2*t*t*t*t*t+n:r/2*((t-=2)*t*t*t*t+2)+n},easeInSine:function(e,t,n,r,i){return-r*Math.cos(t/i*(Math.PI/2))+r+n},easeOutSine:function(e,t,n,r,i){return r*Math.sin(t/i*(Math.PI/2))+n},easeInOutSine:function(e,t,n,r,i){return-r/2*(Math.cos(Math.PI*t/i)-1)+n},easeInExpo:function(e,t,n,r,i){return t==0?n:r*Math.pow(2,10*(t/i-1))+n},easeOutExpo:function(e,t,n,r,i){return t==i?n+r:r*(-Math.pow(2,-10*t/i)+1)+n},easeInOutExpo:function(e,t,n,r,i){return t==0?n:t==i?n+r:(t/=i/2)<1?r/2*Math.pow(2,10*(t-1))+n:r/2*(-Math.pow(2,-10*--t)+2)+n},easeInCirc:function(e,t,n,r,i){return-r*(Math.sqrt(1-(t/=i)*t)-1)+n},easeOutCirc:function(e,t,n,r,i){return r*Math.sqrt(1-(t=t/i-1)*t)+n},easeInOutCirc:function(e,t,n,r,i){return(t/=i/2)<1?-r/2*(Math.sqrt(1-t*t)-1)+n:r/2*(Math.sqrt(1-(t-=2)*t)+1)+n},easeInElastic:function(e,t,n,r,i){var s=1.70158,o=0,u=r;if(t==0)return n;if((t/=i)==1)return n+r;o||(o=i*.3);if(u<Math.abs(r)){u=r;var s=o/4}else var s=o/(2*Math.PI)*Math.asin(r/u);return-(u*Math.pow(2,10*(t-=1))*Math.sin((t*i-s)*2*Math.PI/o))+n},easeOutElastic:function(e,t,n,r,i){var s=1.70158,o=0,u=r;if(t==0)return n;if((t/=i)==1)return n+r;o||(o=i*.3);if(u<Math.abs(r)){u=r;var s=o/4}else var s=o/(2*Math.PI)*Math.asin(r/u);return u*Math.pow(2,-10*t)*Math.sin((t*i-s)*2*Math.PI/o)+r+n},easeInOutElastic:function(e,t,n,r,i){var s=1.70158,o=0,u=r;if(t==0)return n;if((t/=i/2)==2)return n+r;o||(o=i*.3*1.5);if(u<Math.abs(r)){u=r;var s=o/4}else var s=o/(2*Math.PI)*Math.asin(r/u);return t<1?-0.5*u*Math.pow(2,10*(t-=1))*Math.sin((t*i-s)*2*Math.PI/o)+n:u*Math.pow(2,-10*(t-=1))*Math.sin((t*i-s)*2*Math.PI/o)*.5+r+n},easeInBack:function(e,t,n,r,i,s){return s==undefined&&(s=1.70158),r*(t/=i)*t*((s+1)*t-s)+n},easeOutBack:function(e,t,n,r,i,s){return s==undefined&&(s=1.70158),r*((t=t/i-1)*t*((s+1)*t+s)+1)+n},easeInOutBack:function(e,t,n,r,i,s){return s==undefined&&(s=1.70158),(t/=i/2)<1?r/2*t*t*(((s*=1.525)+1)*t-s)+n:r/2*((t-=2)*t*(((s*=1.525)+1)*t+s)+2)+n},easeInBounce:function(e,t,n,r,i){return r-jQuery.easing.easeOutBounce(e,i-t,0,r,i)+n},easeOutBounce:function(e,t,n,r,i){return(t/=i)<1/2.75?r*7.5625*t*t+n:t<2/2.75?r*(7.5625*(t-=1.5/2.75)*t+.75)+n:t<2.5/2.75?r*(7.5625*(t-=2.25/2.75)*t+.9375)+n:r*(7.5625*(t-=2.625/2.75)*t+.984375)+n},easeInOutBounce:function(e,t,n,r,i){return t<i/2?jQuery.easing.easeInBounce(e,t*2,0,r,i)*.5+n:jQuery.easing.easeOutBounce(e,t*2-i,0,r,i)*.5+r*.5+n}}),define("jquery/easing",function(){}),function(e){var t="deg";e.fn.rotate=function(n){var r=e(this).css("transform")||"none";if(typeof n=="undefined"){if(r){var i=r.match(/rotate\(([^)]+)\)/);if(i&&i[1])return i[1]}return 0}var i=n.toString().match(/^(-?\d+(\.\d+)?)(.+)?$/);return i&&(i[3]&&(t=i[3]),e(this).css("transform",r.replace(/none|rotate\([^)]*\)/,"")+"rotate("+i[1]+t+")")),this},e.fn.scale=function(t,n,r){var i=e(this).css("transform")||e(this).css("-webkit-transform")||"none";if(typeof t=="undefined"){if(i){var s=i.match(/scale\(([^)]+)\)/);if(s&&s[1])return s[1]}return 1}return e(this).css({transform:i.replace(/none|scale\([^)]*\)/,"")+"scale("+t+")"}),this};var n=e.fx.prototype.cur;e.fx.prototype.cur=function(){return this.prop=="rotate"?parseFloat(e(this.elem).rotate()):this.prop=="scale"?parseFloat(e(this.elem).scale()):n.apply(this,arguments)},e.fx.step.rotate=function(n){e(n.elem).rotate(n.now+t)},e.fx.step.scale=function(t){e(t.elem).scale(t.now)};var r=e.fn.animate;e.fn.animate=function(e){if(typeof e["rotate"]!="undefined"){var n=e.rotate.toString().match(/^(([+-]=)?(-?\d+(\.\d+)?))(.+)?$/);n&&n[5]&&(t=n[5]),e.rotate=n[1]}return r.apply(this,arguments)}}(jQuery),define("jquery/rotate",function(){}),require.config({paths:{knockout:"knockout-2.1.0.debug",jquery:"jquery-1.7.2","jquery/quicksand":"jquery.quicksand","jquery/easing":"jquery.easing.1.3","jquery/rotate":"jquery-animate-css-rotate-scale",modernizr:"modernizr-2.6",gfx:"gfx/gfx","gfx/effects":"gfx/gfx.effects","gfx/flip":"gfx/gfx.flip",signalR:"jquery.signalR-0.5.3.min"},shim:{bootstrap:["jquery"],gfx:["jquery"],"gfx/effects":["gfx"],"gfx/flip":["gfx"],"jquery/quicksand":["jquery"],"jquery/easing":["jquery"],"jquery/rotate":["jquery"],toastr:["jquery"],signalR:["jquery"],"signalr/hubs":["signalR"],jquery:{exports:function(e){return window.jQuery=e,e}}},hbs:{disableI18n:!0,templateExtension:"handlebars",helperDirectory:"Views/Helpers/"}}),require(["jquery","Sammy","handlebars","knockout","knockout.mapping","viewModels/MenuViewModel","viewModels/MainViewModel","viewModels/SideViewModel","viewModels/NewRegistrationViewModel","viewModels/DeleteContactViewModel","bootstrap","modernizr","moment","gfx/effects","gfx/flip","jquery/quicksand","jquery/easing","jquery/rotate","toastr","signalr/hubs"],function(e,t,n,r,i){e(function(){function o(){for(var e in s)for(var t in s[e])this.get(t,s[e][t])}r.mapping=i,window.jQuery=e;var s=[];window.Handlebars=n,window.App={log:function(){try{console.log.apply(console,arguments)}catch(e){try{opera.postError.apply(opera,arguments)}catch(e){}}},navigate:function(){var e=1<=arguments.length?[].slice.call(arguments,0):[];e.unshift("#"),window.location.hash=e.join("/")},urlBuilder:function(e){return function(){var t=1<=arguments.length?[].slice.call(arguments,0):[];return t.unshift(e),t.unshift("%ApplicationPath%api"),t.join("/")}},createViewModel:function(t,n){var r=require(t),i=e(n);if(i.length===0)throw n+" not found.";return new r(i)},applyBindings:function(e,t){if(!!e.__bound)return;e.__bound=!0,!e.render||e.render(),!e.routes||s.push(e.routes());var n=t||e.el;!n.length||(n=n[0]),r.applyBindings(e,n)},setupHub:function(){try{var t=e.connection.contactHub;e.connection.hub.start(),t.refresh=function(t){App.log("Changes detected, need to refresh: "+t),e("body").trigger({type:"update-by-id",contact:t,callback:"update-contact"})},t.remove=function(t){App.log("Changes detected, need to remove: "+t),e("body").trigger({type:"update-by-id",contact:t,callback:"delete-contact-confirmed"})}}catch(n){App.log(n)}}};var u=App.createViewModel("viewModels/MainViewModel",".main-content");App.applyBindings(u);var a=App.createViewModel("viewModels/MenuViewModel",".navbar-fixed-top");App.applyBindings(a);var f=App.createViewModel("viewModels/SideViewModel",".sidebar-nav");f.mainView=u,App.applyBindings(f);var l=App.createViewModel("viewModels/NewRegistrationViewModel","#createRegistration");App.applyBindings(l);var c=App.createViewModel("viewModels/DeleteContactViewModel","#confirmDelete");App.applyBindings(c),e("body").on("click","li.contact .front, li.contact .close",function(t){t.preventDefault();var n=e(this).closest("li"),r=e("li.contact.flipped");r.length>0&&r[0]!==n[0]&&r.trigger("flip"),n.data("flippable")==1?n.trigger("flip"):(n.data("flippable",!0),n.gfxFlip({width:180,height:170}).delay(50).queueNext(function(){n.trigger("flip")}))}),e("#source").on("click","li.contact .back a:not(.close)",function(t){t.preventDefault();var n=e(t.target).closest("a"),r=n.parents("li"),i=e("#source li[data-id='"+r.attr("data-id")+"'] .back a"),s=i.index(n),o=e("#destination li[data-id='"+r.attr("data-id")+"'] .back a").get(s);e(o).trigger("click")}),window.getTime=function(e){return typeof e=="string"?moment(e):e()==0?moment():moment(e())},t(o).run("#/");try{App.setupHub()}catch(h){App.log("Error setting up hub: "+h)}})}),define("main",function(){})